##// 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 start = lineno - 1 - context//2
353 start = lineno - 1 - context//2
354 lines = linecache.getlines(filename)
354 lines = linecache.getlines(filename)
355 try:
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 except SyntaxError:
365 except SyntaxError:
358 encoding = "ascii"
366 encoding = "ascii"
359 start = max(start, 0)
367 start = max(start, 0)
General Comments 0
You need to be logged in to leave comments. Login now