diff options
author | Marko Saukko <marko.saukko@cybercom.com> | 2011-04-21 16:45:33 +0300 |
---|---|---|
committer | Marko Saukko <marko.saukko@cybercom.com> | 2011-04-21 17:15:04 +0300 |
commit | 4f1b9d36e27eff1e1c4f329605cc29b525da08fb (patch) | |
tree | d111c528271264bbfa48c346f5e5beff121408ee | |
parent | e36c6aab2732b10be734934d4ae7ccc1941ae8ac (diff) | |
download | kickstarter-4f1b9d36e27eff1e1c4f329605cc29b525da08fb.tar.gz kickstarter-4f1b9d36e27eff1e1c4f329605cc29b525da08fb.tar.bz2 kickstarter-4f1b9d36e27eff1e1c4f329605cc29b525da08fb.zip |
Accept only .yaml files from external configs directory (BMC#16397).
-rwxr-xr-x | tools/kickstarter | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/kickstarter b/tools/kickstarter index 1bed4b4..5b483cb 100755 --- a/tools/kickstarter +++ b/tools/kickstarter @@ -207,12 +207,14 @@ if __name__ == '__main__': ks.process_files(conf, r) for path in image_meta['ExternalConfigs']: for f in os.listdir(path): - if '.yaml' in f: + if f.endswith('.yaml'): fp = file('%s/%s' %(path, f), 'r') local = yaml.load(fp) conf = ks.parse(local) print "Creating %s (%s.ks)" %(conf['Name'], conf['FileName'] ) ks.process_files(conf, r) + else: + print "WARNING: File '%s' ignored." % (f) if options.indexfile: str = create_xml(image_meta) |