diff options
author | Christian Heimes <christian@cheimes.de> | 2007-11-15 02:26:46 +0000 |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-11-15 02:26:46 +0000 |
commit | b1d0a869b0c6a87549967f1aa4bec3654a68bfbb (patch) | |
tree | cd268db5cb678848b402617f694b92cc583d8843 /Python/errors.c | |
parent | e7084798d74f202cf3d2ee6646d53124b0b3fac3 (diff) | |
download | cpython-b1d0a869b0c6a87549967f1aa4bec3654a68bfbb.tar.gz |
Added some additional checks for sys.std?? is None, see #1440
Diffstat (limited to 'Python/errors.c')
-rw-r--r-- | Python/errors.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/errors.c b/Python/errors.c index b45dad46e6..1cd5dfdada 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -626,7 +626,7 @@ PyErr_WriteUnraisable(PyObject *obj) 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; |