diff options
Diffstat (limited to 'Lib/traceback.py')
-rw-r--r-- | Lib/traceback.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/traceback.py b/Lib/traceback.py index 901b99476a..d6a010f415 100644 --- a/Lib/traceback.py +++ b/Lib/traceback.py @@ -604,6 +604,8 @@ class TracebackException: stype = self.exc_type.__qualname__ smod = self.exc_type.__module__ if smod not in ("__main__", "builtins"): + if not isinstance(smod, str): + smod = "<unknown>" stype = smod + '.' + stype if not issubclass(self.exc_type, SyntaxError): |