From 7a20c4974ffe6779a265e7939d676bcf69de5142 Mon Sep 17 00:00:00 2001 From: Unbit Date: Sat, 15 Nov 2014 13:17:52 +0100 Subject: [PATCH] fixed python3 --py-auto-reload-ignore --- plugins/python/python_plugin.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/python/python_plugin.c b/plugins/python/python_plugin.c index e30352f0..a0ad92b6 100644 --- a/plugins/python/python_plugin.c +++ b/plugins/python/python_plugin.c @@ -1459,7 +1459,15 @@ void *uwsgi_python_autoreloader_thread(void *foobar) { int found = 0; struct uwsgi_string_list *usl = up.auto_reload_ignore; while(usl) { +#ifdef PYTHREE + PyObject *zero = PyUnicode_AsUTF8String(mod_name); + char *str_mod_name = PyString_AsString(zero); + int ret_cmp = strcmp(usl->value, str_mod_name); + Py_DECREF(zero); + if (!ret_cmp) { +#else if (!strcmp(usl->value, PyString_AsString(mod_name))) { +#endif found = 1; break; }