Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2007-04-30 13:51:35 (GMT)
committer Dan Williams <dcbw@redhat.com>2007-04-30 13:51:35 (GMT)
commite432cc91cadade61052deb643b536acd424edf47 (patch)
tree36399bae7944b9c9406787e465b3fd444f3778d7 /services
parent58a8cfc795b8f893aba6ab217e2f0a2d2c8cc3a4 (diff)
Fix split_properties usage
Diffstat (limited to 'services')
-rw-r--r--services/presence/activity.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/services/presence/activity.py b/services/presence/activity.py
index cabe427..c856f54 100644
--- a/services/presence/activity.py
+++ b/services/presence/activity.py
@@ -63,7 +63,7 @@ class Activity(DBusGObject):
gobject.PARAM_READWRITE | gobject.PARAM_CONSTRUCT_ONLY)
}
- _RESERVED_PROPNAMES = self.__gproperties__.keys()
+ _RESERVED_PROPNAMES = __gproperties__.keys()
def __init__(self, bus_name, object_id, tp, **kwargs):
"""Initializes the activity and sets its properties to default values.
@@ -169,9 +169,11 @@ class Activity(DBusGObject):
elif pspec.name == _PROP_LOCAL:
self._local = value
elif pspec.name == _PROP_CUSTOM_PROPS:
+ if not value:
+ value = {}
(rprops, cprops) = self._split_properties(value)
self._custom_props = {}
- for (key, dvalue) in cprops:
+ for (key, dvalue) in cprops.items():
self._custom_props[str(key)] = str(dvalue)
self._update_validity()
@@ -487,7 +489,7 @@ class Activity(DBusGObject):
"""
changed = False
# split reserved properties from activity-custom properties
- (rprops, cprops) = self._split_properties()
+ (rprops, cprops) = self._split_properties(properties)
if _PROP_NAME in rprops.keys():
name = rprops[_PROP_NAME]
if name != self._name:
@@ -526,7 +528,7 @@ class Activity(DBusGObject):
"""
rprops = {}
cprops = {}
- for (key, value) in properties:
+ for (key, value) in properties.items():
if key in self._RESERVED_PROPNAMES:
rprops[key] = value
else: