From 0e45b8fcf1978f560713864e18a270719d7d4872 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Thu, 26 Jul 2007 11:08:31 +0200 Subject: [PATCH] Make sure the handle dict values are string. Looks like dbus-python get confused if they are dbus.String. --- sugar/activity/activityhandle.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sugar/activity/activityhandle.py b/sugar/activity/activityhandle.py index 8e90e705..0f2f2d9a 100644 --- a/sugar/activity/activityhandle.py +++ b/sugar/activity/activityhandle.py @@ -67,13 +67,15 @@ class ActivityHandle(object): def get_dict(self): """Retrieve our settings as a dictionary""" - result = { 'activity_id' : self.activity_id } + result = { } + if self.activity_id: + result['activity_id'] = str(self.activity_id) if self.pservice_id: - result['pservice_id'] = self.pservice_id + result['pservice_id'] = str(self.pservice_id) if self.object_id: - result['object_id'] = self.object_id + result['object_id'] = str(self.object_id) if self.uri: - result['uri'] = self.uri + result['uri'] = str(self.uri) return result