diff --git a/boltons/fileutils.py b/boltons/fileutils.py index a5157a6..66d338f 100644 --- a/boltons/fileutils.py +++ b/boltons/fileutils.py @@ -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