summaryrefslogtreecommitdiffstats
path: root/Lib/linecache.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-09-29 01:26:06 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-09-29 01:26:06 (GMT)
commit35c52240ddaf815759b568dfcf3cc9f11aae8246 (patch)
tree3f19624a5a75e652af3ec118689f07c3e0a30f27 /Lib/linecache.py
parent6ec5ed22b2e5b4429ad9e130ecaad7fa16fde691 (diff)
downloadcpython-35c52240ddaf815759b568dfcf3cc9f11aae8246.zip
cpython-35c52240ddaf815759b568dfcf3cc9f11aae8246.tar.gz
cpython-35c52240ddaf815759b568dfcf3cc9f11aae8246.tar.bz2
Merged revisions 85088 via svnmerge from
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 ........
Diffstat (limited to 'Lib/linecache.py')
-rw-r--r--Lib/linecache.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/linecache.py b/Lib/linecache.py
index ef2adf5..f0bb83d 100644
--- 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