[hamster-applet] fixed little bug regards key types
- From: Toms Baugis <tbaugis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hamster-applet] fixed little bug regards key types
- Date: Mon, 26 Apr 2010 16:19:46 +0000 (UTC)
commit c88fa79a0a1197a64e7078f8e98eebe6ccbba8fb
Author: Toms Bauģis <toms baugis gmail com>
Date: Mon Apr 26 17:08:36 2010 +0100
fixed little bug regards key types
src/hamster/overview_totals.py | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/hamster/overview_totals.py b/src/hamster/overview_totals.py
index 1178a04..809d686 100644
--- a/src/hamster/overview_totals.py
+++ b/src/hamster/overview_totals.py
@@ -177,16 +177,15 @@ class TotalsBox(gtk.VBox):
#category totals
if category_sums:
if self.category_sums:
- category_sums = [(key, category_sums[key]) for key in self.category_sums[0]]
+ category_sums = [(key, category_sums[key] or 0) for key in self.category_sums[0]]
else:
category_sums = sorted(category_sums.items(), key=lambda x:x[1], reverse = True)
self.category_sums = zip(*category_sums)
-
# activity totals
if self.activity_sums:
- activity_sums = [(key, activity_sums[key]) for key in self.activity_sums[0]]
+ activity_sums = [(key, activity_sums[key] or 0) for key in self.activity_sums[0]]
else:
activity_sums = sorted(activity_sums.items(), key=lambda x:x[1], reverse = True)
@@ -196,7 +195,7 @@ class TotalsBox(gtk.VBox):
# tag totals
if tag_sums:
if self.tag_sums:
- tag_sums = [(key, tag_sums[key]) for key in self.tag_sums[0]]
+ tag_sums = [(key, tag_sums[key] or 0) for key in self.tag_sums[0]]
else:
tag_sums = sorted(tag_sums.items(), key=lambda x:x[1], reverse = True)
self.tag_sums = zip(*tag_sums)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]