Python 3 support: exception handling syntax

This commit is contained in:
Kamil Cholewiński 2015-04-10 10:35:06 +02:00
parent c52411bd39
commit b26b22c026
1 changed files with 2 additions and 2 deletions

View File

@ -381,11 +381,11 @@ def copy_tree(src, dst, symlinks=False, ignore=None):
# continue with other files
except Error as e:
errors.extend(e.args[0])
except EnvironmentError, why:
except EnvironmentError as why:
errors.append((srcname, dstname, str(why)))
try:
copystat(src, dst)
except OSError, why:
except OSError as why:
if WindowsError is not None and isinstance(why, WindowsError):
# Copying file access times may fail on Windows
pass