summaryrefslogtreecommitdiffstats
path: root/Lib/importlib/_bootstrap.py
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-25 14:47:37 (GMT)
committerAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-25 14:47:37 (GMT)
commitf7a17b48d748e1835bcf9df86fb7fb318bb020f8 (patch)
tree403d91c57f72d6e538ce09a8037bd658bc619760 /Lib/importlib/_bootstrap.py
parent16bdd4120d8452e8e04b124bcdd116608c5166b0 (diff)
downloadcpython-f7a17b48d748e1835bcf9df86fb7fb318bb020f8.zip
cpython-f7a17b48d748e1835bcf9df86fb7fb318bb020f8.tar.gz
cpython-f7a17b48d748e1835bcf9df86fb7fb318bb020f8.tar.bz2
Replace IOError with OSError (#16715)
Diffstat (limited to 'Lib/importlib/_bootstrap.py')
-rw-r--r--Lib/importlib/_bootstrap.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py
index 3ea798d..c71d67d 100644
--- a/Lib/importlib/_bootstrap.py
+++ b/Lib/importlib/_bootstrap.py
@@ -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: