Temporary fix for linecache

This commit is contained in:
Aviv Palivoda committed 2019-10-27 19:25:20 +02:00
1 parent 2a60fbce8c
commit 556582264a
1 file changed
+5 -2
+5 -2
View File
@@ -133,8 +133,11 @@ def updatecache(filename, module_globals=None):
else:
return []
try:
with tokenize.open(fullname) as fp:
lines = fp.readlines()
# TODO: Change this back
# with tokenize.open(fullname) as fp:
# lines = fp.readlines()
with open(fullname, "r") as fp:
lines = fp.read().split("\n")
except OSError:
return []
if lines and not lines[-1].endswith('\n'):