diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2017-02-14 23:07:35 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-04 10:42:30 +0000 |
commit | 92e8c81c941597eb2b4b61d5c28833e4826888f8 (patch) | |
tree | 2d445c700d09aa84f6e04a0757dc2e4dfd4353b8 /scripts/lib/wic/plugins/imager/direct.py | |
parent | 1b11437fb25ece5b3eede52344b071e875fa738f (diff) | |
download | openembedded-core-92e8c81c941597eb2b4b61d5c28833e4826888f8.tar.gz openembedded-core-92e8c81c941597eb2b4b61d5c28833e4826888f8.tar.bz2 openembedded-core-92e8c81c941597eb2b4b61d5c28833e4826888f8.zip |
wic: raise WicError in wic plugins
Replaced sys.exit with raising WicError in wic plugins.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Diffstat (limited to 'scripts/lib/wic/plugins/imager/direct.py')
-rw-r--r-- | scripts/lib/wic/plugins/imager/direct.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py index e51c8be298..9c8a2304a7 100644 --- a/scripts/lib/wic/plugins/imager/direct.py +++ b/scripts/lib/wic/plugins/imager/direct.py @@ -27,13 +27,12 @@ import logging import os import shutil -import sys import tempfile import uuid from time import strftime -from wic.errors import ImageError +from wic.errors import ImageError, WicError from wic.filemap import sparse_copy from wic.ksparser import KickStart, KickStartError from wic.plugin import pluginmgr @@ -58,8 +57,7 @@ class DirectPlugin(ImagerPlugin): try: self.ks = KickStart(wks_file) except KickStartError as err: - logger.error(str(err)) - sys.exit(1) + raise WicError(str(err)) # parse possible 'rootfs=name' items self.rootfs_dir = dict(rdir.split('=') for rdir in rootfs_dir.split(' ')) |