bodhi/model.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit 970d19860175c7aa1d8db3711d1d5cd9a7710c21 Author: Luke Macken lmacken@redhat.com Date: Thu Jul 1 02:33:12 2010 -0400
Fix a bug in the new bugzilla product handling (#448)
diff --git a/bodhi/model.py b/bodhi/model.py index 4a284b8..35ad8c2 100644 --- a/bodhi/model.py +++ b/bodhi/model.py @@ -1045,14 +1045,14 @@ class Bugzilla(SQLObject): log.warning("No bodhi_email defined; skipping bug comment") return bz = Bugzilla.get_bz() - if bug.product not in config.get('bz_products', '').split(','): - log.warning("Skipping %r bug #%d" % (bug.product, self.bz_id)) - return if not comment: comment = self._default_message(update) - log.debug("Adding comment to Bug #%d: %s" % (self.bz_id, comment)) try: bug = bz.getbug(self.bz_id) + if bug.product not in config.get('bz_products', '').split(','): + log.warning("Skipping %r bug #%d" % (bug.product, self.bz_id)) + return + log.debug("Adding comment to Bug #%d: %s" % (self.bz_id, comment)) bug.addcomment(comment) except Exception, e: log.error("Unable to add comment to bug #%d\n%s" % (self.bz_id,