Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/presence/Service.py
diff options
context:
space:
mode:
Diffstat (limited to 'sugar/presence/Service.py')
-rw-r--r--sugar/presence/Service.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/sugar/presence/Service.py b/sugar/presence/Service.py
index 4e1d72f..9219b80 100644
--- a/sugar/presence/Service.py
+++ b/sugar/presence/Service.py
@@ -42,6 +42,10 @@ def _txt_to_dict(txt):
return prop_dict
def compose_service_type(stype, activity_uid):
+ if not activity_uid:
+ return stype
+ if not stype or (type(stype) != type("") and type(stype) != type(u"")):
+ raise ValueError("stype must be a valid string.")
return "_%s_%s" % (activity_uid, stype)
def _decompose_service_type(stype):