diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-01-18 14:22:42 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-19 16:35:37 +0000 |
commit | 9c058f115583592f5cce2a969882fdd0c2ab535f (patch) | |
tree | 158ffb0c24195e8057a9f8b002f7a2d4d267f507 /scripts/lib | |
parent | 13092793693c1c0ea172701578506f4a70a093d2 (diff) | |
download | openembedded-core-9c058f115583592f5cce2a969882fdd0c2ab535f.tar.gz openembedded-core-9c058f115583592f5cce2a969882fdd0c2ab535f.tar.bz2 openembedded-core-9c058f115583592f5cce2a969882fdd0c2ab535f.zip |
wic: catch KickStartError
Catch parsing errors and output them using msger.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r-- | scripts/lib/wic/conf.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/lib/wic/conf.py b/scripts/lib/wic/conf.py index 2e2945130c..922a0f68e6 100644 --- a/scripts/lib/wic/conf.py +++ b/scripts/lib/wic/conf.py @@ -17,7 +17,7 @@ import os -from wic.kickstart import KickStart +from wic.kickstart import KickStart, KickStartError from wic import msger from wic.utils import misc @@ -87,7 +87,10 @@ class ConfigMgr(object): if not ksconf: return - ksobj = KickStart(ksconf) + try: + ksobj = KickStart(ksconf) + except KickStartError as err: + msger.error(str(err)) self.create['ks'] = ksobj self.create['name'] = os.path.splitext(os.path.basename(ksconf))[0] |