##// END OF EJS Templates
replacing pop call that could be made on ampty list
jstenar -
Show More
@@ -353,7 +353,15 b' class Pdb(OldPdb):'
353 353 start = lineno - 1 - context//2
354 354 lines = linecache.getlines(filename)
355 355 try:
356 encoding, _ = openpy.detect_encoding(lambda :lines[:2].pop(0))
356 def readline(x):
357 x = x[:2]
358 def _readline():
359 if x:
360 return x.pop(0)
361 else:
362 raise StopIteration
363 return _readline
364 encoding, _ = openpy.detect_encoding(readline(lines))
357 365 except SyntaxError:
358 366 encoding = "ascii"
359 367 start = max(start, 0)
General Comments 0
You need to be logged in to leave comments. Login now