cast non-bytes arguments to bytes in python3 spool api

This commit is contained in:
Unbit
2014-01-05 09:08:29 +01:00
parent ea19e1e67b
commit a0ff5b91b8
+4
View File
@@ -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);