Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2006-06-19 16:28:44 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-06-19 16:28:44 (GMT)
commit73c94c7bfbc427ad9880c6a6910259c55e485dac (patch)
tree1cda11be4c5a8ff223e1b26e95a0d09c29e305c2 /sugar
parentc65ef6f9cd4afb3560f2551aa9d1ac316711c69b (diff)
Improve some debug output
Diffstat (limited to 'sugar')
-rw-r--r--sugar/presence/PresenceService.py4
-rw-r--r--sugar/presence/Service.py2
2 files changed, 2 insertions, 4 deletions
diff --git a/sugar/presence/PresenceService.py b/sugar/presence/PresenceService.py
index bf5f77f..64b15ed 100644
--- a/sugar/presence/PresenceService.py
+++ b/sugar/presence/PresenceService.py
@@ -486,9 +486,7 @@ class PresenceService(gobject.GObject):
"""Convenience function to share an activity with other buddies."""
if not self._started:
raise RuntimeError("presence service must be started first.")
-
uid = activity.get_id()
- logging.debug('Sharing activity uid %s, stype %s' % (uid, stype))
owner_nick = self._owner.get_nick_name()
real_stype = Service.compose_service_type(stype, uid)
if address and type(address) != type(""):
@@ -503,7 +501,7 @@ class PresenceService(gobject.GObject):
# random port #
port = random.randint(5000, 65535)
- logging.debug('Share activity %s, address %s, port %d' % (stype, address, port))
+ logging.debug('Share activity %s, type %s, address %s, port %d, properties %s' % (uid, stype, address, port, properties))
service = Service.Service(name=owner_nick, stype=real_stype, domain="local",
address=address, port=port, properties=properties)
# Publish it to the world
diff --git a/sugar/presence/Service.py b/sugar/presence/Service.py
index 743efe9..330bfd0 100644
--- a/sugar/presence/Service.py
+++ b/sugar/presence/Service.py
@@ -138,7 +138,7 @@ class Service(object):
if self._properties.has_key(_ACTIVITY_UID_TAG):
prop_uid = self._properties[_ACTIVITY_UID_TAG]
if (prop_uid and not uid) or (prop_uid != uid):
- raise ValueError("ActivityUID property specified, but the service type's activity UID didn't match it.")
+ raise ValueError("ActivityUID property specified, but the service type's activity UID didn't match it: %s, %s" % (prop_uid, uid))
self._activity_uid = uid
if uid and not self._properties.has_key(_ACTIVITY_UID_TAG):
self._properties[_ACTIVITY_UID_TAG] = uid