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/scripts/linktree.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/scripts/linktree.py')
-rwxr-xr-x | Tools/scripts/linktree.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Tools/scripts/linktree.py b/Tools/scripts/linktree.py index 982f480..e83f198 100755 --- a/Tools/scripts/linktree.py +++ b/Tools/scripts/linktree.py @@ -32,13 +32,13 @@ def main(): return 1 try: os.mkdir(newtree, 0o777) - except os.error as msg: + except OSError as msg: print(newtree + ': cannot mkdir:', msg) return 1 linkname = os.path.join(newtree, link) try: os.symlink(os.path.join(os.pardir, oldtree), linkname) - except os.error as msg: + except OSError as msg: if not link_may_fail: print(linkname + ': cannot symlink:', msg) return 1 @@ -51,7 +51,7 @@ def linknames(old, new, link): if debug: print('linknames', (old, new, link)) try: names = os.listdir(old) - except os.error as msg: + except OSError as msg: print(old + ': warning: cannot listdir:', msg) return for name in names: |