[IMP] add classmethod to remove a service

bzr revid: chs@tinyerp.com-20100129102829-i68neaqgoxqkw6ud
This commit is contained in:
Christophe Simonis 2010-01-29 11:28:29 +01:00
parent cb307f9213
commit 52e8a67446
1 changed files with 5 additions and 0 deletions

View File

@ -56,6 +56,11 @@ class Service(object):
def exists(cls, name):
return name in cls._services
@classmethod
def remove(cls, name):
if cls.exits(name):
cls._services.pop(name)
def exportMethod(self, method):
if callable(method):
self._methods[method.__name__] = method