summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/plugins/imager
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-02-14 23:07:35 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-04 23:18:17 +0000
commit8da175607c0d3434428a3bf4ee1549919b698709 (patch)
tree1122f66b976598d3d3aa77cacc67659ccdda0c7c /scripts/lib/wic/plugins/imager
parentf5ae79da406190bf27194d7cecf15926bbb6ef20 (diff)
downloadpoky-8da175607c0d3434428a3bf4ee1549919b698709.tar.gz
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>
Diffstat (limited to 'scripts/lib/wic/plugins/imager')
-rw-r--r--scripts/lib/wic/plugins/imager/direct.py6
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 @@
27import logging 27import logging
28import os 28import os
29import shutil 29import shutil
30import sys
31import tempfile 30import tempfile
32import uuid 31import uuid
33 32
34from time import strftime 33from time import strftime
35 34
36from wic.errors import ImageError 35from wic.errors import ImageError, WicError
37from wic.filemap import sparse_copy 36from wic.filemap import sparse_copy
38from wic.ksparser import KickStart, KickStartError 37from wic.ksparser import KickStart, KickStartError
39from wic.plugin import pluginmgr 38from wic.plugin import pluginmgr
@@ -58,8 +57,7 @@ class DirectPlugin(ImagerPlugin):
58 try: 57 try:
59 self.ks = KickStart(wks_file) 58 self.ks = KickStart(wks_file)
60 except KickStartError as err: 59 except KickStartError as err:
61 logger.error(str(err)) 60 raise WicError(str(err))
62 sys.exit(1)
63 61
64 # parse possible 'rootfs=name' items 62 # parse possible 'rootfs=name' items
65 self.rootfs_dir = dict(rdir.split('=') for rdir in rootfs_dir.split(' ')) 63 self.rootfs_dir = dict(rdir.split('=') for rdir in rootfs_dir.split(' '))