[hamster-applet] dbus serializes empty arrays to 0. we will see more of this



commit ce4b5329bc143f7f46dce207a09d4a4978b66d5a
Author: Toms Bauģis <toms baugis gmail com>
Date:   Tue Apr 13 14:34:27 2010 +0100

    dbus serializes empty arrays to 0. we will see more of this

 src/hamster/client.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/hamster/client.py b/src/hamster/client.py
index e420b7f..fc91b5b 100644
--- a/src/hamster/client.py
+++ b/src/hamster/client.py
@@ -48,6 +48,9 @@ def from_dbus_fact(fact):
     else:
         fact['end_time'] = None
 
+    if not fact['tags']:
+        fact['tags'] = []
+        
     if 'date' in fact:
         fact['date'] = dt.datetime.utcfromtimestamp(fact['date']).date()
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]