bodhi/metrics.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 04d88b0bfa03e89b432fc2ded75af037c73f8693
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Dec 19 21:26:27 2008 -0500
Actually fix the metrics issue this time
diff --git a/bodhi/metrics.py b/bodhi/metrics.py
index c53aa07..0c0c529 100644
--- a/bodhi/metrics.py
+++ b/bodhi/metrics.py
@@ -64,9 +64,9 @@ class AllMetric(Metric):
self.timeline[update_type] = {}
def update(self, update):
- if update.status != 'stable':
+ if update.status != 'stable' or not update.date_pushed:
return
- if update.date_pushed and update.date_pushed < self.earliest:
+ if update.date_pushed < self.earliest:
self.earliest = update.date_pushed
if not self.timeline[update.type].has_key(update.date_pushed.month):
self.timeline[update.type][update.date_pushed.month] = 0