From 1b11437fb25ece5b3eede52344b071e875fa738f Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Tue, 14 Feb 2017 22:21:38 +0200 Subject: wic: raise WicError in core modules Replaced sys.exit with raising WicError in the core wic modules. Signed-off-by: Ed Bartosh --- scripts/lib/wic/utils/runner.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/lib/wic/utils/runner.py') 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: -- cgit v1.2.3