services/presence/: Move internal_get_activity to TestPresenceService
This commit is contained in:
parent
f7ba2aa1e2
commit
2abcd89c1f
@ -304,7 +304,7 @@ class PresenceService(ExportedGObject):
|
||||
@dbus.service.method(_PRESENCE_INTERFACE, in_signature="s",
|
||||
out_signature="o")
|
||||
def GetActivityById(self, actid):
|
||||
act = self.internal_get_activity(actid)
|
||||
act = self._activities.get(actid, None)
|
||||
if not act or not act.props.valid:
|
||||
raise NotFoundError("The activity was not found.")
|
||||
return act.object_path()
|
||||
@ -419,11 +419,6 @@ class PresenceService(ExportedGObject):
|
||||
if activity:
|
||||
activity.set_properties(props)
|
||||
|
||||
def internal_get_activity(self, actid):
|
||||
if not self._activities.has_key(actid):
|
||||
return None
|
||||
return self._activities[actid]
|
||||
|
||||
|
||||
def main(test_num=0, randomize=False):
|
||||
loop = gobject.MainLoop()
|
||||
|
@ -155,6 +155,9 @@ class TestPresenceService(PresenceService):
|
||||
return TestOwner(self, self._bus_name, self._get_next_object_id(),
|
||||
self.__test_num, self.__randomize)
|
||||
|
||||
def internal_get_activity(self, actid):
|
||||
return self._activities.get(actid, None):
|
||||
|
||||
|
||||
def _extract_public_key(keyfile):
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user