Be even more lenient when catching errors from readlines().

This commit is contained in:
Guido van Rossum 2007-07-10 11:34:31 +00:00
parent 4b5386f398
commit d10b2dc4fc
1 changed files with 2 additions and 1 deletions

View File

@ -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"