fixed issue 1725:No debugging under WingIDE, thanks Joe

This commit is contained in:
mdipierro
2013-10-16 09:09:22 -05:00
parent c5a2706c1b
commit cfe7c65987
2 changed files with 13 additions and 10 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.7.4-stable+timestamp.2013.10.16.09.02.18
Version 2.7.4-stable+timestamp.2013.10.16.09.08.27
+12 -9
View File
@@ -1269,16 +1269,19 @@ end tell
py2exe_getline = linecache.getline
def getline(filename, lineno, *args, **kwargs):
line = py2exe_getline(filename, lineno, *args, **kwargs)
if not line:
f = open(filename, "r")
if not line:
try:
for i, line in enumerate(f):
if lineno == i + 1:
break
else:
line = None
finally:
f.close()
f = open(filename, "r")
try:
for i, line in enumerate(f):
if lineno == i + 1:
break
else:
line = None
finally:
f.close()
except (IOError, OSError):
line = None
return line
linecache.getline = getline