summaryrefslogtreecommitdiffstats
path: root/func
diff options
context:
space:
mode:
authormakkalot <makkalot@gmail.com>2008-06-01 13:07:16 +0300
committermakkalot <makkalot@gmail.com>2008-06-01 13:07:16 +0300
commitaeb784f6958b39d16e4ae879a68e35962b053a76 (patch)
tree6e85a25442e51aa5d79a39acb1973064b05a021c /func
parent771267e7b441e4f730ea41880268c298ef01d771 (diff)
downloadthird_party-func-aeb784f6958b39d16e4ae879a68e35962b053a76.tar.gz
third_party-func-aeb784f6958b39d16e4ae879a68e35962b053a76.tar.xz
third_party-func-aeb784f6958b39d16e4ae879a68e35962b053a76.zip
reorganizing the func_arg to be able to get method arguments, small pushes are cool
Diffstat (limited to 'func')
-rw-r--r--func/minion/modules/func_arg.py8
-rw-r--r--func/minion/modules/func_module.py24
2 files changed, 25 insertions, 7 deletions
diff --git a/func/minion/modules/func_arg.py b/func/minion/modules/func_arg.py
index 95cc000..27beb93 100644
--- a/func/minion/modules/func_arg.py
+++ b/func/minion/modules/func_arg.py
@@ -138,5 +138,13 @@ class NonExistingMethodRegistered(IncompatibleTypesException):
"""
pass
+class UnregisteredMethodArgument(IncompatibleTypesException):
+ """
+ That exception is to try to remove the errors that user may
+ do during method registration process. If a argument is missed
+ to be registerted in the method that exception is Raised!
+ """
+ pass
+
diff --git a/func/minion/modules/func_module.py b/func/minion/modules/func_module.py
index 21ec3ea..edb554c 100644
--- a/func/minion/modules/func_module.py
+++ b/func/minion/modules/func_module.py
@@ -15,7 +15,7 @@ import inspect
from func import logger
from func.config import read_config
from func.commonconfig import FuncdConfig
-
+from func.minion.modules.func_arg import * #the arg getter stuff
class FuncModule(object):
@@ -81,16 +81,26 @@ class FuncModule(object):
return True
return False
- def __get_method_args(self,name):
+ def get_method_args(self,name):
"""
- Gives a list of arguments for particular given
- method_name
+ Gets arguments with their formats according to ArgCompatibility
+ class' rules.
- @param name: the name of the method
+ @param :name The name of the method
+ @return : dict with args or Raise Exception if something wrong
+ happens
+ """
+ pass
+
+ def __is_all_args_registered(self,name):
+ """
+ Checks if module writer has made some mistakes about
+ argument registering
+
+ @param name: the name of the method with arguments registered in it
@retun : dict(name:[arg1,arg2...]) or {}
"""
- #we dont need them actually
-
+ #FIXME tobe rewritten
if name in self.__base_methods.keys():
return {}