From ce08177132f46d8ae0fa636feaa19f157482afa5 Mon Sep 17 00:00:00 2001 From: makkalot Date: Tue, 27 May 2008 14:47:14 +0300 Subject: sometimes fails if there is no attr like that fixed --- func/minion/modules/func_module.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'func') diff --git a/func/minion/modules/func_module.py b/func/minion/modules/func_module.py index d05af66..b13d3ac 100644 --- a/func/minion/modules/func_module.py +++ b/func/minion/modules/func_module.py @@ -89,12 +89,15 @@ class FuncModule(object): @param name: the name of the method @retun : dict(name:[arg1,arg2...]) or {} """ + #we dont need them actually + if name in self.__base_methods.keys(): + return {} - if not self.__is_public_valid_method(name): + #tests showed that sometimes happens + if not hasattr(self,name): return {} - #we dont need them actually - if name in self.__base_methods.keys(): + if not self.__is_public_valid_method(name): return {} arg_names = inspect.getargspec(getattr(self,name)) -- cgit