From 2210f907db02519198a1c8c2b6d8743e2401d899 Mon Sep 17 00:00:00 2001 From: Unbit Date: Fri, 8 Aug 2014 22:14:03 +0200 Subject: [PATCH] fixed uwsgi.rpc --- plugins/python/uwsgi_pymodule.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/python/uwsgi_pymodule.c b/plugins/python/uwsgi_pymodule.c index 089976a6..14be2668 100644 --- a/plugins/python/uwsgi_pymodule.c +++ b/plugins/python/uwsgi_pymodule.c @@ -382,6 +382,11 @@ PyObject *py_uwsgi_rpc(PyObject * self, PyObject * args) { if (PyString_Check(py_node)) { node = PyString_AsString(py_node); } +#ifdef PYTHREE + else if (PyUnicode_Check(py_node)) { + node = PyBytes_AsString(PyUnicode_AsLatin1String(py_node)); + } +#endif py_func = PyTuple_GetItem(args, 1);