]> granicus.if.org Git - python/commitdiff
Trivial fix to the pep277 checkin: ensure that exceptions always have a filename...
authorMark Hammond <mhammond@skippinet.com.au>
Thu, 3 Oct 2002 07:24:48 +0000 (07:24 +0000)
committerMark Hammond <mhammond@skippinet.com.au>
Thu, 3 Oct 2002 07:24:48 +0000 (07:24 +0000)
Modules/posixmodule.c

index 494ca61bae64137fb64eaf87e6ab3a5c2fb10194..ab18cbbc2912ac71d127ac9149d7be469b8759c3 100644 (file)
@@ -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;
                }