Show More
@@ -824,9 +824,15 b' class VerboseTB(TBTools):' | |||||
824 | # disabled. |
|
824 | # disabled. | |
825 | call = tpl_call_fail % func |
|
825 | call = tpl_call_fail % func | |
826 |
|
826 | |||
827 | def linereader(file=file, lnum=[lnum], getline=linecache.getline): |
|
827 | # Don't attempt to tokenize binary files. | |
828 |
|
|
828 | if file.endswith(('.so', '.pyd', '.dll')): | |
|
829 | frames.append('%s %s\n' % (link,call)) | |||
|
830 | continue | |||
|
831 | elif file.endswith(('.pyc','.pyo')): | |||
|
832 | # Look up the corresponding source file. | |||
829 |
|
|
833 | file = pyfile.source_from_cache(file) | |
|
834 | ||||
|
835 | def linereader(file=file, lnum=[lnum], getline=linecache.getline): | |||
830 | line = getline(file, lnum[0]) |
|
836 | line = getline(file, lnum[0]) | |
831 | lnum[0] += 1 |
|
837 | lnum[0] += 1 | |
832 | return line |
|
838 | return line |
General Comments 0
You need to be logged in to leave comments.
Login now