[Sugar-devel] [PATCH Finance] Bug fix

Manuel Kaufmann humitos at gmail.com
Tue Jul 3 08:42:25 EDT 2012


These two bugs were introduced in 1c21ce44b81831132aaa520fdde4e8eccce1b705

Signed-off-by: Manuel Kaufmann <humitos at gmail.com>
---
 chartscreen.py |    2 +-
 finance.py     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/chartscreen.py b/chartscreen.py
index 3538836..f1c40cd 100644
--- a/chartscreen.py
+++ b/chartscreen.py
@@ -75,7 +75,7 @@ class ChartScreen(Gtk.HBox):
             amount = t['amount']
 
             if t['type'] == 'debit':
-                if not cat self.category_total:
+                if cat not in self.category_total:
                     self.category_total[cat] = amount
                 else:
                     self.category_total[cat] += amount
diff --git a/finance.py b/finance.py
index 9325f3b..6ba89cc 100644
--- a/finance.py
+++ b/finance.py
@@ -43,7 +43,7 @@ from sugar3.graphics.toolbarbox import ToolbarButton
 from sugar3.graphics.radiotoolbutton import RadioToolButton
 from sugar3.activity.widgets import StopButton
 from sugar3.activity.widgets import ActivityToolbarButton
-from sugar3.activity import Activity
+from sugar3.activity.activity import Activity
 
 # Set up localization.
 locale.setlocale(locale.LC_ALL, '')
-- 
1.7.10.4



More information about the Sugar-devel mailing list