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>
This commit is contained in:
parent
bda77fd506
commit
1ed97cc886
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue