Show More
@@ -248,7 +248,7 b' def fix_frame_records_filenames(records):' | |||
|
248 | 248 | # Look inside the frame's globals dictionary for __file__, |
|
249 | 249 | # which should be better. However, keep Cython filenames since |
|
250 | 250 | # we prefer the source filenames over the compiled .so file. |
|
251 | filename = py3compat.cast_unicode(filename, "utf-8") | |
|
251 | filename = py3compat.cast_unicode_py2(filename, "utf-8") | |
|
252 | 252 | if not filename.endswith(('.pyx', '.pxd', '.pxi')): |
|
253 | 253 | better_fn = frame.f_globals.get('__file__', None) |
|
254 | 254 | if isinstance(better_fn, str): |
@@ -540,9 +540,9 b' class ListTB(TBTools):' | |||
|
540 | 540 | list = [] |
|
541 | 541 | for filename, lineno, name, line in extracted_list[:-1]: |
|
542 | 542 | item = ' File %s"%s"%s, line %s%d%s, in %s%s%s\n' % \ |
|
543 | (Colors.filename, py3compat.cast_unicode(filename, "utf-8"), Colors.Normal, | |
|
543 | (Colors.filename, py3compat.cast_unicode_py2(filename, "utf-8"), Colors.Normal, | |
|
544 | 544 | Colors.lineno, lineno, Colors.Normal, |
|
545 | Colors.name, py3compat.cast_unicode(name, "utf-8"), Colors.Normal) | |
|
545 | Colors.name, py3compat.cast_unicode_py2(name, "utf-8"), Colors.Normal) | |
|
546 | 546 | if line: |
|
547 | 547 | item += ' %s\n' % line.strip() |
|
548 | 548 | list.append(item) |
@@ -550,9 +550,9 b' class ListTB(TBTools):' | |||
|
550 | 550 | filename, lineno, name, line = extracted_list[-1] |
|
551 | 551 | item = '%s File %s"%s"%s, line %s%d%s, in %s%s%s%s\n' % \ |
|
552 | 552 | (Colors.normalEm, |
|
553 | Colors.filenameEm, py3compat.cast_unicode(filename, "utf-8"), Colors.normalEm, | |
|
553 | Colors.filenameEm, py3compat.cast_unicode_py2(filename, "utf-8"), Colors.normalEm, | |
|
554 | 554 | Colors.linenoEm, lineno, Colors.normalEm, |
|
555 | Colors.nameEm, py3compat.cast_unicode(name, "utf-8"), Colors.normalEm, | |
|
555 | Colors.nameEm, py3compat.cast_unicode_py2(name, "utf-8"), Colors.normalEm, | |
|
556 | 556 | Colors.Normal) |
|
557 | 557 | if line: |
|
558 | 558 | item += '%s %s%s\n' % (Colors.line, line.strip(), |
General Comments 0
You need to be logged in to leave comments.
Login now