summaryrefslogtreecommitdiffstats
path: root/Lib/linecache.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-07-10 11:34:31 (GMT)
committerGuido van Rossum <guido@python.org>2007-07-10 11:34:31 (GMT)
commitd10b2dc4fc7d0c37b6d835c861c1d112ea0cbafb (patch)
tree8d22c55435ec55d196def38e4bb7e10885f47c5a /Lib/linecache.py
parent4b5386f3982b86817cfe42dbedfaf0c04d0e443f (diff)
downloadcpython-d10b2dc4fc7d0c37b6d835c861c1d112ea0cbafb.zip
cpython-d10b2dc4fc7d0c37b6d835c861c1d112ea0cbafb.tar.gz
cpython-d10b2dc4fc7d0c37b6d835c861c1d112ea0cbafb.tar.bz2
Be even more lenient when catching errors from readlines().
Diffstat (limited to 'Lib/linecache.py')
-rw-r--r--Lib/linecache.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/linecache.py b/Lib/linecache.py
index 77e3ab7..90b8646 100644
--- a/Lib/linecache.py
+++ b/Lib/linecache.py
@@ -125,11 +125,12 @@ def updatecache(filename, module_globals=None):
# No luck
## print '*** Cannot stat', filename, ':', msg
return []
+## print("Refreshing cache for %s..." % fullname)
try:
fp = open(fullname, 'rU')
lines = fp.readlines()
fp.close()
- except IOError as msg:
+ except Exception as msg:
## print '*** Cannot open', fullname, ':', msg
return []
coding = "utf-8"