From d3890360694d4ec5f77350610b117a327b4e5209 Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Thu, 3 Oct 2002 07:24:48 +0000 Subject: [PATCH] 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) --- Modules/posixmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 494ca61bae..ab18cbbc29 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; } -- 2.40.0