summaryrefslogtreecommitdiff
path: root/Lib/traceback.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2006-08-26 20:37:44 +0000
committerGuido van Rossum <guido@python.org>2006-08-26 20:37:44 +0000
commitc0719f329f62fd4ac96de65b07d1ed20e78b0d24 (patch)
tree76c2d9de7521d863a44c9421346a762617ef3f69 /Lib/traceback.py
parent15e915b172e32810f8f2e63b575ac5fdeacfccbd (diff)
downloadcpython-c0719f329f62fd4ac96de65b07d1ed20e78b0d24.tar.gz
Inspired by SF patch #860326, make the exception formatting by
traceback.py be closer to the built-in formatting. A few unittests had to be fixed, too.
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)]