Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 383bff4 commit 52ce3b0Copy full SHA for 52ce3b0
1 file changed
Python/pythonrun.c
@@ -1888,9 +1888,11 @@ print_exception(PyObject *f, PyObject *value)
1888
_Py_IDENTIFIER(print_file_and_line);
1889
1890
if (!PyExceptionInstance_Check(value)) {
1891
- PyFile_WriteString("TypeError: print_exception(): Exception expected for value, ", f);
1892
- PyFile_WriteString(Py_TYPE(value)->tp_name, f);
1893
- PyFile_WriteString(" found\n", f);
+ err = PyFile_WriteString("TypeError: print_exception(): Exception expected for value, ", f);
+ err += PyFile_WriteString(Py_TYPE(value)->tp_name, f);
+ err += PyFile_WriteString(" found\n", f);
1894
+ if (err)
1895
+ PyErr_Clear();
1896
return;
1897
}
1898
0 commit comments