summaryrefslogtreecommitdiff
path: root/Lib/compileall.py
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-25 16:47:37 +0200
committerAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-25 16:47:37 +0200
commitf7a17b48d748e1835bcf9df86fb7fb318bb020f8 (patch)
tree403d91c57f72d6e538ce09a8037bd658bc619760 /Lib/compileall.py
parent16bdd4120d8452e8e04b124bcdd116608c5166b0 (diff)
downloadcpython-git-f7a17b48d748e1835bcf9df86fb7fb318bb020f8.tar.gz
Replace IOError with OSError (#16715)
Diffstat (limited to 'Lib/compileall.py')
-rw-r--r--Lib/compileall.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/compileall.py b/Lib/compileall.py
index a47e84fd60..a8e9a31291 100644
--- a/Lib/compileall.py
+++ b/Lib/compileall.py
@@ -106,7 +106,7 @@ def compile_file(fullname, ddir=None, force=False, rx=None, quiet=False,
actual = chandle.read(8)
if expect == actual:
return success
- except IOError:
+ except OSError:
pass
if not quiet:
print('Compiling {!r}...'.format(fullname))
@@ -124,7 +124,7 @@ def compile_file(fullname, ddir=None, force=False, rx=None, quiet=False,
msg = msg.decode(sys.stdout.encoding)
print(msg)
success = 0
- except (SyntaxError, UnicodeError, IOError) as e:
+ except (SyntaxError, UnicodeError, OSError) as e:
if quiet:
print('*** Error compiling {!r}...'.format(fullname))
else: