summaryrefslogtreecommitdiffstats
path: root/scripts/cp-noerror
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-06-02 13:12:48 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-02 11:45:58 +0100
commit438eabc248f272e3d272aecaa4c9cec177b172d5 (patch)
tree5be184533b66ee841de8dfe9f455382886e7b867 /scripts/cp-noerror
parent874a269eb1d70060c2f3b3f8b70800e2aea789f4 (diff)
downloadopenembedded-core-contrib-438eabc248f272e3d272aecaa4c9cec177b172d5.tar.gz
scripts: python3: use new style except statement
Changed old syle except statements 'except <exception>, var' to new style 'except <exception> as var' as old style is not supported in python3. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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 28eb90d4a05..d8be6774c71 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])