diff options
Diffstat (limited to 'import-layers/yocto-poky/scripts/cp-noerror')
-rwxr-xr-x | import-layers/yocto-poky/scripts/cp-noerror | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/import-layers/yocto-poky/scripts/cp-noerror b/import-layers/yocto-poky/scripts/cp-noerror index 28eb90d4a..35eb211be 100755 --- a/import-layers/yocto-poky/scripts/cp-noerror +++ b/import-layers/yocto-poky/scripts/cp-noerror @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Allow copying of $1 to $2 but if files in $1 disappear during the copy operation, # don't error. @@ -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]) |