projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6ec5ed2
)
Merged revisions 85088 via svnmerge from
author
Victor Stinner
<victor.stinner@haypocalc.com>
Wed, 29 Sep 2010 01:26:06 +0000
(
01:26
+0000)
committer
Victor Stinner
<victor.stinner@haypocalc.com>
Wed, 29 Sep 2010 01:26:06 +0000
(
01:26
+0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85088 | victor.stinner | 2010-09-29 03:24:59 +0200 (mer., 29 sept. 2010) | 4 lines
linecache.updatecache() returns an empty list on error
lines variable was not set on IOError
........
Lib/linecache.py
patch
|
blob
|
history
diff --git
a/Lib/linecache.py
b/Lib/linecache.py
index ef2adf5369389778fc82c22f9758356baa46ce06..f0bb83d1d80e26f1ea10740a6d965633b674acb7 100644
(file)
--- a/
Lib/linecache.py
+++ b/
Lib/linecache.py
@@
-128,7
+128,7
@@
def updatecache(filename, module_globals=None):
with open(fullname, 'r', encoding=coding) as fp:
lines = fp.readlines()
except IOError:
- pass
+ lines = []
if lines and not lines[-1].endswith('\n'):
lines[-1] += '\n'
size, mtime = stat.st_size, stat.st_mtime