Suppress annoying warnings about unknown activities from the PS

This commit is contained in:
Dan Williams
2007-07-18 02:04:01 -04:00
parent 83a49dcd4e
commit 326126cbd7
3 changed files with 28 additions and 8 deletions
+9 -1
View File
@@ -113,7 +113,15 @@ class HomeActivity(gobject.GObject):
colour for the icon.
"""
pservice = presenceservice.get_instance()
activity = pservice.get_activity(self._activity_id)
# HACK to suppress warning in logs when activity isn't found
# (if it's locally launched and not shared yet)
activity = None
for act in pservice.get_activities():
if self._activity_id == act.props.id:
activity = act
break
if activity != None:
return XoColor(activity.props.color)
else: