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 23:18:17 +0000 |
commit | 8da175607c0d3434428a3bf4ee1549919b698709 (patch) | |
tree | 1122f66b976598d3d3aa77cacc67659ccdda0c7c /scripts/lib/wic/plugins/imager | |
parent | f5ae79da406190bf27194d7cecf15926bbb6ef20 (diff) | |
download | poky-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.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 @@ | |||
27 | import logging | 27 | import logging |
28 | import os | 28 | import os |
29 | import shutil | 29 | import shutil |
30 | import sys | ||
31 | import tempfile | 30 | import tempfile |
32 | import uuid | 31 | import uuid |
33 | 32 | ||
34 | from time import strftime | 33 | from time import strftime |
35 | 34 | ||
36 | from wic.errors import ImageError | 35 | from wic.errors import ImageError, WicError |
37 | from wic.filemap import sparse_copy | 36 | from wic.filemap import sparse_copy |
38 | from wic.ksparser import KickStart, KickStartError | 37 | from wic.ksparser import KickStart, KickStartError |
39 | from wic.plugin import pluginmgr | 38 | from 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(' ')) |