mirror of https://github.com/python/cpython
open() now raises IOError, not RuntimeError!
This commit is contained in:
parent
c431549e21
commit
590177bc88
|
@ -311,7 +311,7 @@ def try_open(file):
|
||||||
for dir in INFOPATH:
|
for dir in INFOPATH:
|
||||||
try:
|
try:
|
||||||
return open(dir + file, 'r')
|
return open(dir + file, 'r')
|
||||||
except RuntimeError:
|
except IOError:
|
||||||
pass
|
pass
|
||||||
raise NoSuchFile, file
|
raise NoSuchFile, file
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue