summaryrefslogtreecommitdiffstats
path: root/scripts/cp-noerror
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/cp-noerror')
-rwxr-xr-xscripts/cp-noerror8
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):
33 shutil.copy2(srcname, dstname) 33 shutil.copy2(srcname, dstname)
34 # catch the Error from the recursive copytree so that we can 34 # catch the Error from the recursive copytree so that we can
35 # continue with other files 35 # continue with other files
36 except shutil.Error, err: 36 except shutil.Error as err:
37 errors.extend(err.args[0]) 37 errors.extend(err.args[0])
38 except EnvironmentError, why: 38 except EnvironmentError as why:
39 errors.append((srcname, dstname, str(why))) 39 errors.append((srcname, dstname, str(why)))
40 try: 40 try:
41 shutil.copystat(src, dst) 41 shutil.copystat(src, dst)
42 except OSError, why: 42 except OSError as why:
43 errors.extend((src, dst, str(why))) 43 errors.extend((src, dst, str(why)))
44 if errors: 44 if errors:
45 raise shutil.Error, errors 45 raise shutil.Error(errors)
46 46
47try: 47try:
48 copytree(sys.argv[1], sys.argv[2]) 48 copytree(sys.argv[1], sys.argv[2])