]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
backport nowonder's checkin of
authorMichael W. Hudson <mwh@python.net>
Tue, 24 Sep 2002 11:23:05 +0000 (11:23 +0000)
committerMichael W. Hudson <mwh@python.net>
Tue, 24 Sep 2002 11:23:05 +0000 (11:23 +0000)
    revision 2.265 of bltinmodule.c

date: 2002/08/27 16:58:00;  author: nowonder;  state: Exp;  lines: +1 -1

execfile should call PyErr_SetFromErrnoWithFilename instead of
simply PyErr_SetFromErrno

This closes bug 599163.

Python/bltinmodule.c

index d002d5895406df55f2db1e673defaecc78561357..4601c49c486cb3059b6da1697b2a1e1c63ca5bfe 100644 (file)
@@ -611,7 +611,7 @@ builtin_execfile(PyObject *self, PyObject *args)
         }
 
        if (!exists) {
-               PyErr_SetFromErrno(PyExc_IOError);
+               PyErr_SetFromErrnoWithFilename(PyExc_IOError, filename);
                return NULL;
        }
        cf.cf_flags = 0;