diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2017-02-14 22:21:38 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-04 23:18:17 +0000 |
commit | f5ae79da406190bf27194d7cecf15926bbb6ef20 (patch) | |
tree | 8f745825923833393a896c3a084e42cd3f184528 /scripts/lib/wic/utils/runner.py | |
parent | 3d47a212a627af50c78099eaf7308a6d38aaf1b3 (diff) | |
download | poky-f5ae79da406190bf27194d7cecf15926bbb6ef20.tar.gz |
wic: raise WicError in core modules
Replaced sys.exit with raising WicError in the core wic modules.
(From OE-Core rev: 1b11437fb25ece5b3eede52344b071e875fa738f)
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/runner.py')
-rw-r--r-- | scripts/lib/wic/utils/runner.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/lib/wic/utils/runner.py b/scripts/lib/wic/utils/runner.py index d27dcc7afd..5ede1929a3 100644 --- a/scripts/lib/wic/utils/runner.py +++ b/scripts/lib/wic/utils/runner.py | |||
@@ -18,7 +18,8 @@ | |||
18 | import logging | 18 | import logging |
19 | import os | 19 | import os |
20 | import subprocess | 20 | import subprocess |
21 | import sys | 21 | |
22 | from wic.errors import WicError | ||
22 | 23 | ||
23 | logger = logging.getLogger('wic') | 24 | logger = logging.getLogger('wic') |
24 | 25 | ||
@@ -72,8 +73,7 @@ def runtool(cmdln_or_args, catch=1): | |||
72 | except OSError as err: | 73 | except OSError as err: |
73 | if err.errno == 2: | 74 | if err.errno == 2: |
74 | # [Errno 2] No such file or directory | 75 | # [Errno 2] No such file or directory |
75 | logger.error('Cannot run command: %s, lost dependency?', cmd) | 76 | raise WicError('Cannot run command: %s, lost dependency?' % cmd) |
76 | sys.exit(1) | ||
77 | else: | 77 | else: |
78 | raise # relay | 78 | raise # relay |
79 | finally: | 79 | finally: |