1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-11 04:19:50 +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:
Ed Bartosh
2017-02-14 22:21:38 +02:00
committed by Richard Purdie
parent 3d47a212a6
commit f5ae79da40
4 changed files with 36 additions and 43 deletions
+3 -3
View File
@@ -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: