fixed latin1 encoding with python3

This commit is contained in:
Unbit
2013-07-02 16:19:12 +02:00
parent 703444dd40
commit 656de924eb
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -819,7 +819,7 @@ PyObject *py_uwsgi_advanced_sendfile(PyObject * self, PyObject * args) {
}
#ifdef PYTHREE
else if (PyUnicode_Check(what)) {
filename = PyBytes_AsString(PyUnicode_AsASCIIString(what));
filename = PyBytes_AsString(PyUnicode_AsLatin1String(what));
fd = open(filename, O_RDONLY);
if (fd < 0) {