Loading cloudcontrol/node/host/plugins.py +6 −1 Original line number Diff line number Diff line Loading @@ -7,6 +7,8 @@ from cloudcontrol.common.client.tags import Tag from cloudcontrol.common.jobs import Job from cloudcontrol.common.tql.db.helpers import taggify from cloudcontrol.node.exc import PluginError logger = logging.getLogger(__name__) Loading Loading @@ -68,7 +70,10 @@ class Plugin(object): def _decorator_method(self, name=None): def decorator(func): self.methods[func.__name__ if name is None else name] = func register_name = func.__name__ if name is None else name if register_name in self.methods: raise PluginError('Already defined method %s' % register_name) self.methods[register_name] = func return func return decorator Loading Loading
cloudcontrol/node/host/plugins.py +6 −1 Original line number Diff line number Diff line Loading @@ -7,6 +7,8 @@ from cloudcontrol.common.client.tags import Tag from cloudcontrol.common.jobs import Job from cloudcontrol.common.tql.db.helpers import taggify from cloudcontrol.node.exc import PluginError logger = logging.getLogger(__name__) Loading Loading @@ -68,7 +70,10 @@ class Plugin(object): def _decorator_method(self, name=None): def decorator(func): self.methods[func.__name__ if name is None else name] = func register_name = func.__name__ if name is None else name if register_name in self.methods: raise PluginError('Already defined method %s' % register_name) self.methods[register_name] = func return func return decorator Loading