diff --git a/plugins/python/uwsgi_pymodule.c b/plugins/python/uwsgi_pymodule.c index 8906f7f5..87bd2216 100644 --- a/plugins/python/uwsgi_pymodule.c +++ b/plugins/python/uwsgi_pymodule.c @@ -1805,7 +1805,11 @@ PyObject *py_uwsgi_send_spool(PyObject * self, PyObject * args, PyObject *kw) { } } else { +#ifdef PYTHREE + PyObject *str = PyObject_Bytes(val); +#else PyObject *str = PyObject_Str(val); +#endif if (!str) { Py_DECREF(zero); uwsgi_buffer_destroy(ub);