diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-24 17:58:48 (GMT) |
---|---|---|
committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-24 17:58:48 (GMT) |
commit | 8b33dd8e547790af86e9fc85ea6c315ead276b6e (patch) | |
tree | 4da041d085b8c0226f691429036835167e3874ac /Tools/freeze/bkfile.py | |
parent | 6a7a49c6318afe8a54fe6dda2dd321af2a275295 (diff) | |
download | cpython-8b33dd8e547790af86e9fc85ea6c315ead276b6e.zip cpython-8b33dd8e547790af86e9fc85ea6c315ead276b6e.tar.gz cpython-8b33dd8e547790af86e9fc85ea6c315ead276b6e.tar.bz2 |
Use OESeeror instead of os.error (#16720)
Patch by Serhiy Storchaka.
Diffstat (limited to 'Tools/freeze/bkfile.py')
-rw-r--r-- | Tools/freeze/bkfile.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Tools/freeze/bkfile.py b/Tools/freeze/bkfile.py index 0e895f2..58246fa 100644 --- a/Tools/freeze/bkfile.py +++ b/Tools/freeze/bkfile.py @@ -7,11 +7,11 @@ class _BkFile: self.__backup = file + '~' try: os.unlink(self.__backup) - except os.error: + except OSError: pass try: os.rename(file, self.__backup) - except os.error: + except OSError: self.__backup = None self.__file = _orig_open(file, mode, bufsize) self.closed = self.__file.closed |