]> granicus.if.org Git - python/commitdiff
execfile should call PyErr_SetFromErrnoWithFilename instead of
authorPeter Schneider-Kamp <nowonder@nowonder.de>
Tue, 27 Aug 2002 16:58:00 +0000 (16:58 +0000)
committerPeter Schneider-Kamp <nowonder@nowonder.de>
Tue, 27 Aug 2002 16:58:00 +0000 (16:58 +0000)
simply PyErr_SetFromErrno

This closes bug 599163.

Python/bltinmodule.c

index 660abeb039b12aff43c43d375c98524b79883088..2387deb667d3b5e3b460b689d21d02f22ef3d8fd 100644 (file)
@@ -553,7 +553,7 @@ builtin_execfile(PyObject *self, PyObject *args)
         }
 
        if (!exists) {
-               PyErr_SetFromErrno(PyExc_IOError);
+               PyErr_SetFromErrnoWithFilename(PyExc_IOError, filename);
                return NULL;
        }
        cf.cf_flags = 0;