mirror of
https://git.yoctoproject.org/poky
synced 2026-06-11 16:30:23 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
3d47a212a6
commit
f5ae79da40
@@ -33,6 +33,7 @@ import re
|
||||
from collections import defaultdict
|
||||
from distutils import spawn
|
||||
|
||||
from wic.errors import WicError
|
||||
from wic.utils import runner
|
||||
|
||||
logger = logging.getLogger('wic')
|
||||
@@ -74,9 +75,8 @@ def _exec_cmd(cmd_and_args, as_shell=False, catch=3):
|
||||
ret, out = runner.runtool(args, catch)
|
||||
out = out.strip()
|
||||
if ret != 0:
|
||||
logger.error("_exec_cmd: %s returned '%s' instead of 0\noutput: %s" % \
|
||||
(cmd_and_args, ret, out))
|
||||
sys.exit(1)
|
||||
raise WicError("_exec_cmd: %s returned '%s' instead of 0\noutput: %s" % \
|
||||
(cmd_and_args, ret, out))
|
||||
|
||||
logger.debug("_exec_cmd: output for %s (rc = %d): %s",
|
||||
cmd_and_args, ret, out)
|
||||
|
||||
Reference in New Issue
Block a user