diff Lib/linecache.py @ 42173:91ade67ab230

Be even more lenient when catching errors from readlines().
author Guido van Rossum <guido@python.org>
date Tue, 10 Jul 2007 11:34:31 +0000
parents d07d34b53db5
children 11407c1f68ca
line wrap: on
line diff
--- a/Lib/linecache.py	Tue Jul 10 09:12:49 2007 +0000
+++ b/Lib/linecache.py	Tue Jul 10 11:34:31 2007 +0000
@@ -125,11 +125,12 @@
             # 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"