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 10:42:30 +0000 |
commit | 1b11437fb25ece5b3eede52344b071e875fa738f (patch) | |
tree | 032865c5c123d757a34e24693fe4743bcd2e18f5 /scripts/lib/wic/utils/runner.py | |
parent | b7c19f1ee8b850806c73ccd6f99c42d94a725fc9 (diff) | |
download | openembedded-core-1b11437fb25ece5b3eede52344b071e875fa738f.tar.gz openembedded-core-1b11437fb25ece5b3eede52344b071e875fa738f.tar.bz2 openembedded-core-1b11437fb25ece5b3eede52344b071e875fa738f.zip |
wic: raise WicError in core modules
Replaced sys.exit with raising WicError in the core wic modules.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
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 @@ import logging import os import subprocess -import sys + +from wic.errors import WicError logger = logging.getLogger('wic') @@ -72,8 +73,7 @@ def runtool(cmdln_or_args, catch=1): except OSError as err: if err.errno == 2: # [Errno 2] No such file or directory - logger.error('Cannot run command: %s, lost dependency?', cmd) - sys.exit(1) + raise WicError('Cannot run command: %s, lost dependency?' % cmd) else: raise # relay finally: |