[IMP] add classmethod to remove a service
bzr revid: chs@tinyerp.com-20100129102829-i68neaqgoxqkw6ud
This commit is contained in:
parent
cb307f9213
commit
52e8a67446
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue