mirror of https://github.com/mahmoud/boltons.git
Python 3 support: exception handling syntax
This commit is contained in:
parent
c52411bd39
commit
b26b22c026
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue