Commit 31fb4ee9 authored by Mark Hammond's avatar Mark Hammond

Trivial fix to the pep277 checkin: ensure that exceptions always have a...

Trivial fix to the pep277 checkin: ensure that exceptions always have a filename attribute (previously did only when string filenames were passed, but not when unicode)
parent c019e34f
......@@ -560,7 +560,7 @@ posix_1str(PyObject *args, char *format, int (*func)(const char*),
res = (*wfunc)(PyUnicode_AS_UNICODE(po));
Py_END_ALLOW_THREADS
if (res < 0)
return posix_error();
return posix_error_with_unicode_filename(PyUnicode_AS_UNICODE(po));
Py_INCREF(Py_None);
return Py_None;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment