Return None if the service is unknown

This commit is contained in:
Marco Pesenti Gritti 2006-05-12 18:46:33 -04:00
parent d9ad506f88
commit c481c3f270

View File

@ -73,7 +73,10 @@ class LocalGroup(Group):
self._owner.register() self._owner.register()
def get_service(self, name, stype): def get_service(self, name, stype):
return self._services[(name, stype)] if self._services.has_key((name, stype)):
return self._services[(name, stype)]
else
return None
def get_buddy(self, name): def get_buddy(self, name):
return self._buddies[name] return self._buddies[name]