Show More
@@ -1716,7 +1716,7 b' class InteractiveShell(SingletonConfigurable):' | |||
|
1716 | 1716 | self.write_err('No traceback available to show.\n') |
|
1717 | 1717 | return |
|
1718 | 1718 | |
|
1719 |
if etype |
|
|
1719 | if issubclass(etype, SyntaxError): | |
|
1720 | 1720 | # Though this won't be called by syntax errors in the input |
|
1721 | 1721 | # line, there may be SyntaxError cases with imported code. |
|
1722 | 1722 | self.showsyntaxerror(filename) |
@@ -1769,7 +1769,7 b' class InteractiveShell(SingletonConfigurable):' | |||
|
1769 | 1769 | """ |
|
1770 | 1770 | etype, value, last_traceback = self._get_exc_info() |
|
1771 | 1771 | |
|
1772 |
if filename and etype |
|
|
1772 | if filename and issubclass(etype, SyntaxError): | |
|
1773 | 1773 | try: |
|
1774 | 1774 | value.filename = filename |
|
1775 | 1775 | except: |
@@ -552,7 +552,7 b' class ListTB(TBTools):' | |||
|
552 | 552 | # Not sure if this can still happen in Python 2.6 and above |
|
553 | 553 | list.append( py3compat.cast_unicode(stype) + '\n') |
|
554 | 554 | else: |
|
555 |
if etype |
|
|
555 | if issubclass(etype, SyntaxError): | |
|
556 | 556 | have_filedata = True |
|
557 | 557 | #print 'filename is',filename # dbg |
|
558 | 558 | if not value.filename: value.filename = "<string>" |
General Comments 0
You need to be logged in to leave comments.
Login now