diff options
Diffstat (limited to 'scripts/cp-noerror')
-rwxr-xr-x | scripts/cp-noerror | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/cp-noerror b/scripts/cp-noerror index 28eb90d4a0..d8be6774c7 100755 --- a/scripts/cp-noerror +++ b/scripts/cp-noerror @@ -33,16 +33,16 @@ def copytree(src, dst, symlinks=False, ignore=None): shutil.copy2(srcname, dstname) # catch the Error from the recursive copytree so that we can # continue with other files - except shutil.Error, err: + except shutil.Error as err: errors.extend(err.args[0]) - except EnvironmentError, why: + except EnvironmentError as why: errors.append((srcname, dstname, str(why))) try: shutil.copystat(src, dst) - except OSError, why: + except OSError as why: errors.extend((src, dst, str(why))) if errors: - raise shutil.Error, errors + raise shutil.Error(errors) try: copytree(sys.argv[1], sys.argv[2]) |