##// END OF EJS Templates
Switch back to blacklisting binary files before tokenising.
Thomas Kluyver -
Show More
@@ -825,14 +825,12 b' class VerboseTB(TBTools):'
825 call = tpl_call_fail % func
825 call = tpl_call_fail % func
826
826
827 # Don't attempt to tokenize binary files.
827 # Don't attempt to tokenize binary files.
828 if not file.endswith(('.py', '.pyw')):
828 if file.endswith(('.so', '.pyd', '.dll')):
829 if file.endswith(('.pyc','.pyo')):
829 frames.append('%s %s\n' % (link,call))
830 # Look up the corresponding source file.
830 continue
831 file = pyfile.source_from_cache(file)
831 elif file.endswith(('.pyc','.pyo')):
832 else:
832 # Look up the corresponding source file.
833 # .so, .pyd, etc.
833 file = pyfile.source_from_cache(file)
834 frames.append('%s %s\n' % (link,call))
835 continue
836
834
837 def linereader(file=file, lnum=[lnum], getline=linecache.getline):
835 def linereader(file=file, lnum=[lnum], getline=linecache.getline):
838 line = getline(file, lnum[0])
836 line = getline(file, lnum[0])
General Comments 0
You need to be logged in to leave comments. Login now