Replace IOError with OSError (#16715)
diff --git a/Lib/compileall.py b/Lib/compileall.py
index a47e84f..a8e9a31 100644
--- a/Lib/compileall.py
+++ b/Lib/compileall.py
@@ -106,7 +106,7 @@
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 @@
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: