summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/errors.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/errors.c b/Python/errors.c
index f31f025112..9a23c05282 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -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);