[Python-checkins] r85091 - in python/branches/release31-maint: Lib/linecache.py
victor.stinner
python-checkins at python.org
Wed Sep 29 03:31:23 CEST 2010
Author: victor.stinner
Date: Wed Sep 29 03:31:23 2010
New Revision: 85091
Log:
Merged revisions 85090 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85090 | victor.stinner | 2010-09-29 03:30:45 +0200 (mer., 29 sept. 2010) | 4 lines
linecache.updatecache(): don't the lines into the cache on IOError
Use the same behaviour than Python 2.7.
........
Modified:
python/branches/release31-maint/ (props changed)
python/branches/release31-maint/Lib/linecache.py
Modified: python/branches/release31-maint/Lib/linecache.py
==============================================================================
--- python/branches/release31-maint/Lib/linecache.py (original)
+++ python/branches/release31-maint/Lib/linecache.py Wed Sep 29 03:31:23 2010
@@ -128,7 +128,7 @@
with open(fullname, 'r', encoding=coding) as fp:
lines = fp.readlines()
except IOError:
- lines = []
+ return []
if lines and not lines[-1].endswith('\n'):
lines[-1] += '\n'
size, mtime = stat.st_size, stat.st_mtime
More information about the Python-checkins
mailing list