summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnas Nashif <nashif@linux.intel.com>2011-04-01 04:48:41 +0100
committerAnas Nashif <nashif@linux.intel.com>2011-04-01 04:48:41 +0100
commitf9ce81e59224d9681d345c43987dc8a0fd9361bb (patch)
treefd431caef13c8a3b5860cab3948de5decbb4a747
parent7e4ea3f3dd0ec327b506fa4f12a0ea60c9e7705e (diff)
downloadkickstarter-f9ce81e59224d9681d345c43987dc8a0fd9361bb.tar.gz
kickstarter-f9ce81e59224d9681d345c43987dc8a0fd9361bb.tar.bz2
kickstarter-f9ce81e59224d9681d345c43987dc8a0fd9361bb.zip
check for inline configs
-rwxr-xr-xtools/kickstarter14
1 files changed, 8 insertions, 6 deletions
diff --git a/tools/kickstarter b/tools/kickstarter
index 687187c..47a523c 100755
--- a/tools/kickstarter
+++ b/tools/kickstarter
@@ -140,8 +140,9 @@ def image_xml(root, img):
def create_xml(image_meta):
root = etree.Element("image-configs")
- for img in image_meta['Configurations']:
- image_xml(root,img)
+ if image_meta.has_key('Configurations'):
+ for img in image_meta['Configurations']:
+ image_xml(root,img)
for path in image_meta['ExternalConfigs']:
for f in os.listdir(path):
if '.yaml' in f:
@@ -184,10 +185,11 @@ if __name__ == '__main__':
image_meta = yaml.load(ks.image_stream)
r = repo_meta['Repositories']
- for img in image_meta['Configurations']:
- conf = ks.parse(img)
- print "Creating %s (%s.ks)" %(img['Name'], img['FileName'] )
- ks.process_files(conf, r)
+ if image_meta.has_key('Configurations'):
+ for img in image_meta['Configurations']:
+ conf = ks.parse(img)
+ print "Creating %s (%s.ks)" %(img['Name'], img['FileName'] )
+ ks.process_files(conf, r)
for path in image_meta['ExternalConfigs']:
for f in os.listdir(path):
if '.yaml' in f: