[Python-checkins] r54158 - in python/branches/release25-maint: Misc/NEWS Python/pythonrun.c
georg.brandl
python-checkins at python.org
Tue Mar 6 13:16:54 CET 2007
Author: georg.brandl
Date: Tue Mar 6 13:16:52 2007
New Revision: 54158
Modified:
python/branches/release25-maint/Misc/NEWS
python/branches/release25-maint/Python/pythonrun.c
Log:
Bug #1674503: close the file opened by execfile() in an error condition.
(backport)
Modified: python/branches/release25-maint/Misc/NEWS
==============================================================================
--- python/branches/release25-maint/Misc/NEWS (original)
+++ python/branches/release25-maint/Misc/NEWS Tue Mar 6 13:16:52 2007
@@ -12,6 +12,8 @@
Core and builtins
-----------------
+- Bug #1674503: close the file opened by execfile() in an error condition.
+
- Patch #1674228: when assigning a slice (old-style), check for the
sq_ass_slice instead of the sq_slice slot.
Modified: python/branches/release25-maint/Python/pythonrun.c
==============================================================================
--- python/branches/release25-maint/Python/pythonrun.c (original)
+++ python/branches/release25-maint/Python/pythonrun.c Tue Mar 6 13:16:52 2007
@@ -1244,12 +1244,12 @@
mod = PyParser_ASTFromFile(fp, filename, start, 0, 0,
flags, NULL, arena);
+ if (closeit)
+ fclose(fp);
if (mod == NULL) {
PyArena_Free(arena);
return NULL;
}
- if (closeit)
- fclose(fp);
ret = run_mod(mod, filename, globals, locals, flags, arena);
PyArena_Free(arena);
return ret;
More information about the Python-checkins
mailing list