summaryrefslogtreecommitdiff
path: root/Python/errors.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-11-15 02:26:46 +0000
committerChristian Heimes <christian@cheimes.de>2007-11-15 02:26:46 +0000
commitb1d0a869b0c6a87549967f1aa4bec3654a68bfbb (patch)
treecd268db5cb678848b402617f694b92cc583d8843 /Python/errors.c
parente7084798d74f202cf3d2ee6646d53124b0b3fac3 (diff)
downloadcpython-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.c2
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;