diff options
author | 2011-02-05 10:34:28 -0800 | |
---|---|---|
committer | 2011-02-05 10:34:28 -0800 | |
commit | 63133f019f13c20b5ce9d6029a1899daae4cc452 (patch) | |
tree | 4aec639d26959a448d2f599faa007e692f1ff0eb | |
parent | fix the make failure bug due to a missed rename, update a couple things (diff) | |
download | overlord-63133f019f13c20b5ce9d6029a1899daae4cc452.tar.gz overlord-63133f019f13c20b5ce9d6029a1899daae4cc452.tar.bz2 overlord-63133f019f13c20b5ce9d6029a1899daae4cc452.zip |
add an irc data element to the overlay xml
-rw-r--r-- | overlord/api.py | 1 | ||||
-rw-r--r-- | overlord/overlays/overlay.py | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/overlord/api.py b/overlord/api.py index 936af9b..0fe9362 100644 --- a/overlord/api.py +++ b/overlord/api.py @@ -212,6 +212,7 @@ class OverlordAPI(object): 'owner_name': overlay.owner_name, 'owner_email': overlay.owner_email, 'homepage': overlay.homepage, + 'irc': overlay.irc, 'description': overlay.description, #'src_uris': [e.src for e in overlay.sources], 'src_uris': overlay.source_uris(), diff --git a/overlord/overlays/overlay.py b/overlord/overlays/overlay.py index 4a3cae7..e8730f9 100644 --- a/overlord/overlays/overlay.py +++ b/overlord/overlays/overlay.py @@ -210,6 +210,12 @@ class Overlay(object): self.feeds = [ensure_unicode(strip_text(e)) for e in xml.findall('feed')] + _irc = xml.find('irc') + if _irc != None: + self.irc = ensure_unicode(strip_text(_irc)) + else: + self.irc = None + def __eq__(self, other): for i in ('description', 'homepage', 'name', 'owner_email', @@ -249,6 +255,10 @@ class Overlay(object): homepage = ET.Element('homepage') homepage.text = self.homepage repo.append(homepage) + if self.irc != None: + irc = ET.Element('irc') + irc.text = self.irc + repo.append(irc) owner = ET.Element('owner') repo.append(owner) owner_email = ET.Element('email') @@ -354,6 +364,9 @@ class Overlay(object): result += u'\n '.join((u'\n' + link).split(u'\n')) result += u'\n' + if self.irc != None: + result += u'\nIRC : ' + self.irc + u'\n' + if self.feeds: result += u'\n%s:' % ((len(self.feeds) == 1) and "Feed" or "Feeds") for i in self.feeds: |