##// END OF EJS Templates
change explicit decode to cast_unicode
Jörgen Stenarson -
Show More
@@ -30,7 +30,7 b' import bdb'
30 import linecache
30 import linecache
31 import sys
31 import sys
32
32
33 from IPython.utils import PyColorize
33 from IPython.utils import PyColorize, py3compat
34 from IPython.core import ipapi
34 from IPython.core import ipapi
35 from IPython.utils import coloransi, io, openpy
35 from IPython.utils import coloransi, io, openpy
36 from IPython.core.excolors import exception_colors
36 from IPython.core.excolors import exception_colors
@@ -374,7 +374,7 b' class Pdb(OldPdb):'
374 and tpl_line_em \
374 and tpl_line_em \
375 or tpl_line
375 or tpl_line
376 ret.append(self.__format_line(linetpl, filename,
376 ret.append(self.__format_line(linetpl, filename,
377 start + 1 + i, line.decode(encoding, errors="replace"),
377 start + 1 + i, py3compat.cast_unicode(line),
378 arrow = show_arrow) )
378 arrow = show_arrow) )
379 return ''.join(ret)
379 return ''.join(ret)
380
380
@@ -439,7 +439,7 b' class Pdb(OldPdb):'
439 except SyntaxError:
439 except SyntaxError:
440 encoding = "ascii"
440 encoding = "ascii"
441 for lineno in range(first, last+1):
441 for lineno in range(first, last+1):
442 line = lines[lineno].decode(encoding, errors="replace")
442 line = py3compat.cast_unicode(lines[lineno])
443 if not line:
443 if not line:
444 break
444 break
445
445
General Comments 0
You need to be logged in to leave comments. Login now