mirror of
https://git.yoctoproject.org/poky
synced 2026-07-26 19:17:07 +00: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
@@ -26,10 +26,10 @@
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
from glob import glob
|
||||
|
||||
from wic.errors import WicError
|
||||
from wic.pluginbase import SourcePlugin
|
||||
from wic.utils.misc import exec_cmd, get_bitbake_var
|
||||
|
||||
@@ -81,16 +81,14 @@ class BootimgPartitionPlugin(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)
|
||||
|
||||
boot_files = get_bitbake_var("IMAGE_BOOT_FILES")
|
||||
|
||||
if not boot_files:
|
||||
logger.error('No boot files defined, IMAGE_BOOT_FILES unset')
|
||||
sys.exit(1)
|
||||
raise WicError('No boot files defined, IMAGE_BOOT_FILES unset')
|
||||
|
||||
logger.debug('Boot files: %s', boot_files)
|
||||
|
||||
@@ -100,8 +98,7 @@ class BootimgPartitionPlugin(SourcePlugin):
|
||||
if ';' in src_entry:
|
||||
dst_entry = tuple(src_entry.split(';'))
|
||||
if not dst_entry[0] or not dst_entry[1]:
|
||||
logger.error('Malformed boot file entry: %s', src_entry)
|
||||
sys.exit(1)
|
||||
raise WicError('Malformed boot file entry: %s' % src_entry)
|
||||
else:
|
||||
dst_entry = (src_entry, src_entry)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user