mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
Added some additional checks for sys.std?? is None, see #1440
This commit is contained in:
parent
70021d7164
commit
2be03734f8
7 changed files with 17 additions and 12 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue