diff options
author | Chris Lumens <clumens@redhat.com> | 2008-11-10 16:26:03 -0500 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2008-11-10 16:26:03 -0500 |
commit | 6cce05565a4e75f6726478bfe20429952f2a3dc9 (patch) | |
tree | 57da46402b0d7daa195ba4a3c798bf5f2d8ccd16 /filer.py | |
parent | 8d5c43387bbbc05c82fd80d25dc00442e432ec5c (diff) | |
download | anaconda-6cce05565a4e75f6726478bfe20429952f2a3dc9.tar.gz anaconda-6cce05565a4e75f6726478bfe20429952f2a3dc9.tar.xz anaconda-6cce05565a4e75f6726478bfe20429952f2a3dc9.zip |
Bugzilla has changed its return values for a couple queries.
Diffstat (limited to 'filer.py')
-rw-r--r-- | filer.py | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -325,8 +325,8 @@ class BugzillaFiler(AbstractFiler): if key == "platform": platformLst = self.__withBugzillaDo(lambda b: b._proxy.Bug.legal_values({'field': 'platform'})) - if not val in platformLst: - kwargs[key] = platformLst[0] + if not val in platformLst['values']: + kwargs[key] = platformLst['values'][0] bug = self.__withBugzillaDo(lambda b: b.createbug(**kwargs)) for (wb, val) in whiteboards: @@ -343,13 +343,14 @@ class BugzillaFiler(AbstractFiler): def getproduct(self, prod): details = self.__withBugzillaDo(lambda b: b.getproducts()) - if prod not in details.keys(): - if self.defaultProduct: - return self.defaultProduct - else: - raise ValueError, "The product %s is not valid and no defaultProduct is set." % prod + for d in details: + if d['name'] == prod: + return prod + + if self.defaultProduct: + return self.defaultProduct else: - return prod + raise ValueError, "The product %s is not valid and no defaultProduct is set." % prod def getversion(self, ver, prod): details = self.__withBugzillaDo(lambda b: b._proxy.bugzilla.getProductDetails(prod)) |