diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-05-04 16:06:19 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-14 23:05:13 +0100 |
commit | e301be3cd09499e605fb204fc4f197eca11f9305 (patch) | |
tree | 65845d48cb3bc4b0b94211f12dab6a5ea9b93b1a /scripts/lib/wic/utils | |
parent | ed10a80c2c113acbdd1c9602a4a7d0d8fc799a62 (diff) | |
download | poky-e301be3cd09499e605fb204fc4f197eca11f9305.tar.gz |
wic: use new syntax of 'except' statement
New syntax 'except Exception as err' is supported by Python >= 2.7.
Old syntax 'except Exception, err' is not supported by Python 3.
Used new syntax to be able to run wic on Python 3.
[YOCTO #9412]
(From OE-Core rev: 15e88714d6b0a93f72e8a19b083fcc1f2006e128)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic/utils')
-rw-r--r-- | scripts/lib/wic/utils/runner.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/wic/utils/runner.py b/scripts/lib/wic/utils/runner.py index 7431917ff0..737751bd73 100644 --- a/scripts/lib/wic/utils/runner.py +++ b/scripts/lib/wic/utils/runner.py | |||
@@ -67,7 +67,7 @@ def runtool(cmdln_or_args, catch=1): | |||
67 | (sout, serr) = process.communicate() | 67 | (sout, serr) = process.communicate() |
68 | # combine stdout and stderr, filter None out | 68 | # combine stdout and stderr, filter None out |
69 | out = ''.join(filter(None, [sout, serr])) | 69 | out = ''.join(filter(None, [sout, serr])) |
70 | except OSError, err: | 70 | except OSError as err: |
71 | if err.errno == 2: | 71 | if err.errno == 2: |
72 | # [Errno 2] No such file or directory | 72 | # [Errno 2] No such file or directory |
73 | msger.error('Cannot run command: %s, lost dependency?' % cmd) | 73 | msger.error('Cannot run command: %s, lost dependency?' % cmd) |