bodhi/metrics.py | 3 ++-
bodhi/model.py | 6 ++++++
bodhi/templates/show.kid | 5 ++++-
3 files changed, 12 insertions(+), 2 deletions(-)
New commits:
commit c34694ba4bcb3c52803ddfe0d92fcfdc8bc4fb4b
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Aug 22 14:28:35 2008 -0400
Don't close bugs filed against the 'Security Response' product (#197)
diff --git a/bodhi/model.py b/bodhi/model.py
index 39533c8..6a8dc0a 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -833,6 +833,9 @@ class Bugzilla(SQLObject):
log.debug("Setting Bug #%d to ON_QA" % self.bz_id)
try:
bug = bz.getbug(self.bz_id)
+ if bug.product == 'Security Response':
+ log.warning("Skipping Security Response bug")
+ return
bug.setstatus('ON_QA', comment=comment)
except Exception, e:
log.error("Unable to alter bug #%d\n%s" % (self.bz_id, str(e)))
@@ -842,6 +845,9 @@ class Bugzilla(SQLObject):
try:
ver = '-'.join(get_nvr(update.builds[0].nvr)[-2:])
bug = bz.getbug(self.bz_id)
+ if bug.product == 'Security Response':
+ log.warning("Not closing Security Response bug")
+ return
bug.close('NEXTRELEASE', fixedin=ver)
except xmlrpclib.Fault, f:
log.error("Unable to close bug #%d: %s" % (self.bz_id, str(f)))
commit 7dfb538532bc31399a6c1f4ed4923abbd1a28842
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Aug 22 13:47:31 2008 -0400
Fix a metrics bug that prevented it from working
diff --git a/bodhi/metrics.py b/bodhi/metrics.py
index 6d780b7..a715acd 100644
--- a/bodhi/metrics.py
+++ b/bodhi/metrics.py
@@ -428,6 +428,7 @@ class MetricData(Singleton):
if not rel.metrics:
log.warning("No metrics found for %s" % rel.name)
return
+ self.init_metrics(rel)
if not freshwidgets.has_key(rel.name):
freshwidgets[rel.name] = {}
for metric in self.metrics:
@@ -435,7 +436,7 @@ class MetricData(Singleton):
if widget:
freshwidgets[rel.name][metric.__class__.__name__] = widget
- self.widgets = freshwidgets
+ self.widgets = freshwidgets
self.age = datetime.utcnow()
return self.widgets[release]
commit c259617d3ab081119e864262734379b8ae0a10f6
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Aug 22 12:38:33 2008 -0400
Handle None bug titles in our update template
diff --git a/bodhi/templates/show.kid b/bodhi/templates/show.kid
index c6ef92a..ad5c18f 100644
--- a/bodhi/templates/show.kid
+++ b/bodhi/templates/show.kid
@@ -184,7 +184,10 @@ karma = "<img src=\"%s\" align=\"top\"
/> <b>%d</b>" % (tg.url('/static/images/k
<blockquote>
<div py:for="bug in update.bugs">
<?python
- title = escape(bug.title.encode('utf8', 'replace'))
+ if bug.title:
+ title = escape(bug.title.encode('utf8', 'replace'))
+ else:
+ title = 'Unable to fetch bug title'
cve = title.split()[0].replace(':', '')
if cve.startswith('CVE-'):
title = util.link(cve, 'http://cve.mitre.org/cgi-bin/cvename.cgi?name='
+ cve) + ': ' + escape(' '.join(title.split()[1:]))
Show replies by date