summaryrefslogtreecommitdiff
path: root/Lib/traceback.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/traceback.py')
-rw-r--r--Lib/traceback.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/traceback.py b/Lib/traceback.py
index efd0f75394..eb2fdf690a 100644
--- a/Lib/traceback.py
+++ b/Lib/traceback.py
@@ -163,6 +163,9 @@ def format_exception_only(etype, value):
"""
stype = etype.__name__
+ smod = etype.__module__
+ if smod not in ("exceptions", "__main__", "__builtin__"):
+ stype = smod + '.' + stype
if not issubclass(etype, SyntaxError):
return [_format_final_exc_line(stype, value)]