mirror of
https://github.com/python/cpython.git
synced 2025-10-06 15:11:58 +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
|
@ -915,7 +915,7 @@ class SourceLoader(_LoaderBasics):
|
|||
path = self.get_filename(fullname)
|
||||
try:
|
||||
source_bytes = self.get_data(path)
|
||||
except IOError as exc:
|
||||
except OSError as exc:
|
||||
raise ImportError("source not available through get_data()",
|
||||
name=fullname) from exc
|
||||
readsource = _io.BytesIO(source_bytes).readline
|
||||
|
@ -961,7 +961,7 @@ class SourceLoader(_LoaderBasics):
|
|||
source_mtime = int(st['mtime'])
|
||||
try:
|
||||
data = self.get_data(bytecode_path)
|
||||
except IOError:
|
||||
except OSError:
|
||||
pass
|
||||
else:
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue