Mercurial > cpython-lru_cache-weakref
diff Python/errors.c @ 43855:ee081609cee8
Added some additional checks for sys.std?? is None, see #1440
| author | Christian Heimes <christian@cheimes.de> |
|---|---|
| date | Thu, 15 Nov 2007 02:26:46 +0000 |
| parents | 704e6711e50d |
| children | 0889daf6d0d9 |
line wrap: on
line diff
--- a/Python/errors.c Thu Nov 15 02:15:53 2007 +0000 +++ b/Python/errors.c Thu Nov 15 02:26:46 2007 +0000 @@ -626,7 +626,7 @@ PyObject *f, *t, *v, *tb; PyErr_Fetch(&t, &v, &tb); f = PySys_GetObject("stderr"); - if (f != NULL) { + if (f != NULL && f != Py_None) { PyFile_WriteString("Exception ", f); if (t) { PyObject* moduleName;
