mirror of
https://git.yoctoproject.org/poky
synced 2026-05-02 09:32:14 +02:00
wic: raise WicError in wic plugins
Replaced sys.exit with raising WicError in wic plugins. (From OE-Core rev: 92e8c81c941597eb2b4b61d5c28833e4826888f8) 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
f5ae79da40
commit
8da175607c
@@ -17,8 +17,8 @@
|
||||
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
|
||||
from wic.errors import WicError
|
||||
from wic.pluginbase import SourcePlugin
|
||||
from wic.utils.misc import get_bitbake_var
|
||||
|
||||
@@ -61,14 +61,12 @@ class FSImagePlugin(SourcePlugin):
|
||||
if not bootimg_dir:
|
||||
bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE")
|
||||
if not bootimg_dir:
|
||||
logger.error("Couldn't find DEPLOY_DIR_IMAGE, exiting\n")
|
||||
sys.exit(1)
|
||||
raise WicError("Couldn't find DEPLOY_DIR_IMAGE, exiting")
|
||||
|
||||
logger.debug('Bootimg dir: %s', bootimg_dir)
|
||||
|
||||
if 'file' not in source_params:
|
||||
logger.error("No file specified\n")
|
||||
sys.exit(1)
|
||||
raise WicError("No file specified")
|
||||
|
||||
src = os.path.join(bootimg_dir, source_params['file'])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user