Skip to content

Commit 5821bc5

Browse files
committed
Py_Initialize(): Apply patch by Jürgen Hermann to call
_PyImport_FixupExtension() on the exceptions module. Now reload(exceptions) acts just like reload(sys) instead of raising an ImportError. This closes SF bug #422004.
1 parent 0460106 commit 5821bc5

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Python/pythonrun.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ Py_Initialize(void)
151151

152152
/* initialize builtin exceptions */
153153
_PyExc_Init();
154+
_PyImport_FixupExtension("exceptions", "exceptions");
154155

155156
/* phase 2 of builtins */
156157
_PyImport_FixupExtension("__builtin__", "__builtin__");

0 commit comments

Comments
 (0)