Show More
@@ -1695,7 +1695,7 b' class InteractiveShell(SingletonConfigurable):' | |||
|
1695 | 1695 | self.write_err('No traceback available to show.\n') |
|
1696 | 1696 | return |
|
1697 | 1697 | |
|
1698 |
if etype |
|
|
1698 | if issubclass(etype, SyntaxError): | |
|
1699 | 1699 | # Though this won't be called by syntax errors in the input |
|
1700 | 1700 | # line, there may be SyntaxError cases with imported code. |
|
1701 | 1701 | self.showsyntaxerror(filename) |
@@ -1748,7 +1748,7 b' class InteractiveShell(SingletonConfigurable):' | |||
|
1748 | 1748 | """ |
|
1749 | 1749 | etype, value, last_traceback = self._get_exc_info() |
|
1750 | 1750 | |
|
1751 |
if filename and etype |
|
|
1751 | if filename and issubclass(etype, SyntaxError): | |
|
1752 | 1752 | try: |
|
1753 | 1753 | value.filename = filename |
|
1754 | 1754 | except: |
@@ -563,7 +563,7 b' class ListTB(TBTools):' | |||
|
563 | 563 | # Not sure if this can still happen in Python 2.6 and above |
|
564 | 564 | list.append( str(stype) + '\n') |
|
565 | 565 | else: |
|
566 |
if etype |
|
|
566 | if issubclass(etype, SyntaxError): | |
|
567 | 567 | have_filedata = True |
|
568 | 568 | #print 'filename is',filename # dbg |
|
569 | 569 | if not value.filename: value.filename = "<string>" |
General Comments 0
You need to be logged in to leave comments.
Login now