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