summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-01-18 14:22:42 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-19 17:24:47 +0000
commit1ed97cc886832047945c18e13ea098c775c7f2cc (patch)
tree4a8bd0e02bad8cb1ab799e8cfe3a1831cf31c2cd
parentbda77fd50684c32e464bf2e03376c46d41cabbdc (diff)
downloadpoky-1ed97cc886832047945c18e13ea098c775c7f2cc.tar.gz
wic: catch KickStartError
Catch parsing errors and output them using msger. (From OE-Core rev: 9c058f115583592f5cce2a969882fdd0c2ab535f) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--scripts/lib/wic/conf.py7
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 @@
17 17
18import os 18import os
19 19
20from wic.kickstart import KickStart 20from wic.kickstart import KickStart, KickStartError
21from wic import msger 21from wic import msger
22from wic.utils import misc 22from wic.utils import misc
23 23
@@ -87,7 +87,10 @@ class ConfigMgr(object):
87 if not ksconf: 87 if not ksconf:
88 return 88 return
89 89
90 ksobj = KickStart(ksconf) 90 try:
91 ksobj = KickStart(ksconf)
92 except KickStartError as err:
93 msger.error(str(err))
91 94
92 self.create['ks'] = ksobj 95 self.create['ks'] = ksobj
93 self.create['name'] = os.path.splitext(os.path.basename(ksconf))[0] 96 self.create['name'] = os.path.splitext(os.path.basename(ksconf))[0]