Warning: Remote host denied X11 forwarding. Index: pythonrun.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/pythonrun.c,v retrieving revision 2.212 diff -c -c -r2.212 pythonrun.c *** pythonrun.c 3 Mar 2005 11:45:45 -0000 2.212 --- pythonrun.c 18 Mar 2005 15:42:21 -0000 *************** *** 392,404 **** _Py_PrintReferences(stderr); #endif /* Py_TRACE_REFS */ - /* Now we decref the exception classes. After this point nothing - can raise an exception. That's okay, because each Fini() method - below has been checked to make sure no exceptions are ever - raised. - */ - _PyExc_Fini(); - /* Cleanup auto-thread-state */ #ifdef WITH_THREAD _PyGILState_Fini(); --- 392,397 ---- *************** *** 407,412 **** --- 400,413 ---- /* Clear interpreter state */ PyInterpreterState_Clear(interp); + /* Now we decref the exception classes. After this point nothing + can raise an exception. That's okay, because each Fini() method + below has been checked to make sure no exceptions are ever + raised. + */ + + _PyExc_Fini(); + /* Delete current thread */ PyThreadState_Swap(NULL); PyInterpreterState_Delete(interp); *************** *** 1138,1148 **** if (err) { /* Don't do anything else */ } ! else if (PyClass_Check(exception)) { ! PyClassObject* exc = (PyClassObject*)exception; ! PyObject* className = exc->cl_name; PyObject* moduleName = ! PyDict_GetItemString(exc->cl_dict, "__module__"); if (moduleName == NULL) err = PyFile_WriteString("", f); --- 1139,1148 ---- if (err) { /* Don't do anything else */ } ! else if (PyExceptionClass_Check(exception)) { ! char* className = PyExceptionClass_Name(exception); PyObject* moduleName = ! PyObject_GetAttrString(exception, "__module__"); if (moduleName == NULL) err = PyFile_WriteString("", f); *************** *** 1158,1165 **** if (className == NULL) err = PyFile_WriteString("", f); else ! err = PyFile_WriteObject(className, f, ! Py_PRINT_RAW); } } else --- 1158,1164 ---- if (className == NULL) err = PyFile_WriteString("", f); else ! err = PyFile_WriteString(className, f); } } else