Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/sugar/presence/presenceservice.py
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2008-08-10 22:50:29 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2008-08-10 22:50:29 (GMT)
commit80190bf944977de1315df5f0d35438de29bac010 (patch)
treeb3b0a24ac0a3a2a38f657aeff3129efa0c7112a7 /src/sugar/presence/presenceservice.py
parent4c35d778549477d0865b69761b2d87eef94cad18 (diff)
Several pylint fixes.
Diffstat (limited to 'src/sugar/presence/presenceservice.py')
-rw-r--r--src/sugar/presence/presenceservice.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/sugar/presence/presenceservice.py b/src/sugar/presence/presenceservice.py
index fb59a42..50f0f7f 100644
--- a/src/sugar/presence/presenceservice.py
+++ b/src/sugar/presence/presenceservice.py
@@ -178,7 +178,7 @@ class PresenceService(gobject.GObject):
self._del_object, object_path)
try:
# Pre-fill the activity's ID
- foo = obj.props.id
+ activity_id = obj.props.id
except dbus.exceptions.DBusException:
logging.debug('Cannot get the activity ID')
else:
@@ -239,9 +239,11 @@ class PresenceService(gobject.GObject):
gobject.idle_add(self._emit_activity_invitation_signal, activity_path,
buddy_path, message)
- def _emit_private_invitation_signal(self, bus_name, connection, channel, chan_type):
+ def _emit_private_invitation_signal(self, bus_name, connection,
+ channel, chan_type):
"""Emit GObject event with bus_name, connection and channel"""
- self.emit('private-invitation', bus_name, connection, channel, chan_type)
+ self.emit('private-invitation', bus_name, connection,
+ channel, chan_type)
return False
def _private_invitation_cb(self, bus_name, connection, channel, chan_type):
@@ -469,7 +471,7 @@ class PresenceService(gobject.GObject):
(activity.get_id(), err))
self.emit("activity-shared", False, None, err)
- def share_activity(self, activity, properties={}, private=True):
+ def share_activity(self, activity, properties=None, private=True):
"""Ask presence service to ask the activity to share itself publicly.
Uses the AdvertiseActivity method on the service to ask for the
@@ -484,6 +486,9 @@ class PresenceService(gobject.GObject):
"""
actid = activity.get_id()
+ if properties is None:
+ properties = {}
+
# Ensure the activity is not already shared/joined
for obj in self._objcache.values():
if not isinstance(object, Activity):
@@ -584,7 +589,7 @@ class _MockPresenceService(gobject.GObject):
def get_owner(self):
return None
- def share_activity(self, activity, properties={}):
+ def share_activity(self, activity, properties=None):
return None
_ps = None