]> granicus.if.org Git - python/commitdiff
Issue #10914: Py_NewInterpreter() uses PyErr_PrintEx(0)
authorVictor Stinner <victor.stinner@haypocalc.com>
Tue, 26 Apr 2011 22:20:27 +0000 (00:20 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Tue, 26 Apr 2011 22:20:27 +0000 (00:20 +0200)
... instead of PyErr_Print() because we don't need to set sys attributes,
the sys module is destroyed just after printing the error.

Python/pythonrun.c

index a6787c4fc712f124906aad50adf249508ffba4ef..99bd66d7ad00b1dbf9d3837e20d2c07b2475c175 100644 (file)
@@ -632,7 +632,7 @@ Py_NewInterpreter(void)
 handle_error:
     /* Oops, it didn't work.  Undo it all. */
 
-    PyErr_Print();
+    PyErr_PrintEx(0);
     PyThreadState_Clear(tstate);
     PyThreadState_Swap(save_tstate);
     PyThreadState_Delete(tstate);