mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
Replace IOError with OSError (#16715)
This commit is contained in:
parent
16bdd4120d
commit
f7a17b48d7
121 changed files with 381 additions and 386 deletions
|
|
@ -426,7 +426,7 @@ def _init_posix():
|
|||
try:
|
||||
filename = get_makefile_filename()
|
||||
parse_makefile(filename, g)
|
||||
except IOError as msg:
|
||||
except OSError as msg:
|
||||
my_msg = "invalid Python installation: unable to open %s" % filename
|
||||
if hasattr(msg, "strerror"):
|
||||
my_msg = my_msg + " (%s)" % msg.strerror
|
||||
|
|
@ -438,7 +438,7 @@ def _init_posix():
|
|||
filename = get_config_h_filename()
|
||||
with open(filename) as file:
|
||||
parse_config_h(file, g)
|
||||
except IOError as msg:
|
||||
except OSError as msg:
|
||||
my_msg = "invalid Python installation: unable to open %s" % filename
|
||||
if hasattr(msg, "strerror"):
|
||||
my_msg = my_msg + " (%s)" % msg.strerror
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue