summaryrefslogtreecommitdiffstats
path: root/func
diff options
context:
space:
mode:
authorroot <root@localhost.localdomain>2008-05-27 10:12:07 +0300
committerroot <root@localhost.localdomain>2008-05-27 10:12:07 +0300
commitfd78cbaf22650c3061368684859925f58c005620 (patch)
treebfed9c771ba4c35bea0a2398bb432ed0a327a8f1 /func
parentd50b19eb2930d8aed1344442560c2e9382f11f13 (diff)
downloadthird_party-func-fd78cbaf22650c3061368684859925f58c005620.tar.gz
third_party-func-fd78cbaf22650c3061368684859925f58c005620.tar.xz
third_party-func-fd78cbaf22650c3061368684859925f58c005620.zip
First commit in gsoc,reusing public method validation in func_module
Diffstat (limited to 'func')
-rw-r--r--func/minion/modules/func_module.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/func/minion/modules/func_module.py b/func/minion/modules/func_module.py
index 7d476dc..693d808 100644
--- a/func/minion/modules/func_module.py
+++ b/func/minion/modules/func_module.py
@@ -58,8 +58,7 @@ class FuncModule(object):
"""
handlers = {}
for attr in dir(self):
- if inspect.ismethod(getattr(self, attr)) and attr[0] != '_' and \
- attr != 'register_rpc':
+ if self.__is_public_valid_method(attr):
handlers[attr] = getattr(self, attr)
return handlers
@@ -74,3 +73,10 @@ class FuncModule(object):
def __module_description(self):
return self.description
+
+ def __is_public_valid_method(self,attr):
+ if inspect.ismethod(getattr(self, attr)) and attr[0] != '_' and\
+ attr != 'register_rpc':
+ return True
+ return False
+