mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 10:44:36 +08:00
Temporary fix for linecache
This commit is contained in:
1 parent
2a60fbce8c
commit
556582264a
1 file changed
+5
-2
Vendored
+5
-2
@@ -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'):
|
||||
|
||||
Reference in new issue
Block a user