mirror of
https://github.com/python/cpython.git
synced 2025-07-28 05:34:31 +00:00
When printing an unraisable error, don't print exceptions. before the name.
This duplicates the behavior whening normally printing exceptions.
This commit is contained in:
parent
a892554781
commit
88516a6039
3 changed files with 7 additions and 3 deletions
|
@ -603,7 +603,8 @@ PyErr_WriteUnraisable(PyObject *obj)
|
|||
PyFile_WriteString("<unknown>", f);
|
||||
else {
|
||||
char* modstr = PyString_AsString(moduleName);
|
||||
if (modstr)
|
||||
if (modstr &&
|
||||
strcmp(modstr, "exceptions") != 0)
|
||||
{
|
||||
PyFile_WriteString(modstr, f);
|
||||
PyFile_WriteString(".", f);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue