diff options
author | Anas Nashif <nashif@linux.intel.com> | 2011-03-18 07:28:31 +0000 |
---|---|---|
committer | Anas Nashif <nashif@linux.intel.com> | 2011-03-18 07:28:31 +0000 |
commit | fe99aa46fce0ad0e5f6e310e0cdee3706b318422 (patch) | |
tree | 1fd2534844c44c0c48895924823f02e4e425928a | |
parent | 59db82069a870a32ebeaf255feba5d892cceb317 (diff) | |
download | kickstarter-fe99aa46fce0ad0e5f6e310e0cdee3706b318422.tar.gz kickstarter-fe99aa46fce0ad0e5f6e310e0cdee3706b318422.tar.bz2 kickstarter-fe99aa46fce0ad0e5f6e310e0cdee3706b318422.zip |
add test tools to fetch ks files from repo
-rw-r--r-- | tools/fetch-configs.py | 23 | ||||
-rw-r--r-- | tools/kickstarter | 2 |
2 files changed, 23 insertions, 2 deletions
diff --git a/tools/fetch-configs.py b/tools/fetch-configs.py new file mode 100644 index 0000000..8f9b38b --- /dev/null +++ b/tools/fetch-configs.py @@ -0,0 +1,23 @@ +#!/usr/bin/python + +import urllib2 +from datetime import date +from xml.etree.ElementTree import ElementTree + +url = "http://download.meego.com/snapshots/1.1.90.8.20110317.88/builddata/image-configs.xml" +f = urllib2.urlopen(url) +tree = ElementTree() +tree.parse(f) +configs = tree.findall('config') +for c in configs: + planned = False + name = c.find('name').text + dow = date.today().weekday() + if c.find('schedule').text != '': + schedule = c.find('schedule').text + if schedule == '*' or int(schedule) == dow: + planned = True + else: + print "%s is not scheduled to be created today" %name + planned = False + diff --git a/tools/kickstarter b/tools/kickstarter index bfabc2e..3fc6ab6 100644 --- a/tools/kickstarter +++ b/tools/kickstarter @@ -183,8 +183,6 @@ if __name__ == '__main__': cc = etree.Element('schedule') if img.has_key('Schedule'): cc.text = img['Schedule'] - else: - cc.text = "* * * * *" s.append(cc) root.append(s) str = etree.tostring(root, pretty_print=True) |