mirror of https://github.com/python/cpython.git
Be even more lenient when catching errors from readlines().
This commit is contained in:
parent
4b5386f398
commit
d10b2dc4fc
|
@ -125,11 +125,12 @@ def updatecache(filename, module_globals=None):
|
||||||
# No luck
|
# No luck
|
||||||
## print '*** Cannot stat', filename, ':', msg
|
## print '*** Cannot stat', filename, ':', msg
|
||||||
return []
|
return []
|
||||||
|
## print("Refreshing cache for %s..." % fullname)
|
||||||
try:
|
try:
|
||||||
fp = open(fullname, 'rU')
|
fp = open(fullname, 'rU')
|
||||||
lines = fp.readlines()
|
lines = fp.readlines()
|
||||||
fp.close()
|
fp.close()
|
||||||
except IOError as msg:
|
except Exception as msg:
|
||||||
## print '*** Cannot open', fullname, ':', msg
|
## print '*** Cannot open', fullname, ':', msg
|
||||||
return []
|
return []
|
||||||
coding = "utf-8"
|
coding = "utf-8"
|
||||||
|
|
Loading…
Reference in New Issue