summaryrefslogtreecommitdiffstats
path: root/Lib/traceback.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-03-31 15:59:13 (GMT)
committerGeorg Brandl <georg@python.org>2006-03-31 15:59:13 (GMT)
commit51dbc4c879160c1ee4cf159595368676ced09500 (patch)
treeb838ce6e1bf1820bc69165ad983770fc749f6b26 /Lib/traceback.py
parent3bf538f13d6c98aba0cadba6b2906816ba2a1704 (diff)
downloadcpython-51dbc4c879160c1ee4cf159595368676ced09500.zip
cpython-51dbc4c879160c1ee4cf159595368676ced09500.tar.gz
cpython-51dbc4c879160c1ee4cf159595368676ced09500.tar.bz2
traceback now shows error position for all SyntaxError subclasses,
e.g. IndentationError. (bug #1447885)
Diffstat (limited to 'Lib/traceback.py')
-rw-r--r--Lib/traceback.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/traceback.py b/Lib/traceback.py
index d4a4011..4047ca5 100644
--- a/Lib/traceback.py
+++ b/Lib/traceback.py
@@ -165,7 +165,7 @@ def format_exception_only(etype, value):
if value is None:
list.append(str(stype) + '\n')
else:
- if etype is SyntaxError:
+ if issubclass(etype, SyntaxError):
try:
msg, (filename, lineno, offset, line) = value
except: