[IMP] add classmethod to remove a service
authorChristophe Simonis <chs@tinyerp.com>
Fri, 29 Jan 2010 10:28:29 +0000 (11:28 +0100)
committerChristophe Simonis <chs@tinyerp.com>
Fri, 29 Jan 2010 10:28:29 +0000 (11:28 +0100)
bzr revid: chs@tinyerp.com-20100129102829-i68neaqgoxqkw6ud

bin/netsvc.py

index 0961aa2..b47faba 100644 (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