diff options
author | 2012-12-25 16:47:37 +0200 | |
---|---|---|
committer | 2012-12-25 16:47:37 +0200 | |
commit | f7a17b48d748e1835bcf9df86fb7fb318bb020f8 (patch) | |
tree | 403d91c57f72d6e538ce09a8037bd658bc619760 /Lib/compileall.py | |
parent | #16677: merge with 3.3. (diff) | |
download | cpython-f7a17b48d748e1835bcf9df86fb7fb318bb020f8.tar.gz cpython-f7a17b48d748e1835bcf9df86fb7fb318bb020f8.tar.bz2 cpython-f7a17b48d748e1835bcf9df86fb7fb318bb020f8.zip |
Replace IOError with OSError (#16715)
Diffstat (limited to 'Lib/compileall.py')
-rw-r--r-- | Lib/compileall.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/compileall.py b/Lib/compileall.py index a47e84fd60a..a8e9a312910 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: |