From: Mark Hammond Date: Thu, 3 Oct 2002 07:24:48 +0000 (+0000) Subject: Trivial fix to the pep277 checkin: ensure that exceptions always have a filename... X-Git-Tag: v2.3c1~3901 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d3890360694d4ec5f77350610b117a327b4e5209;p=thirdparty%2FPython%2Fcpython.git 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) --- diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 494ca61bae64..ab18cbbc2912 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -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; }