Avoid importing unnecessary functions from the harvest logic

This commit is contained in:
amercader 2013-08-05 18:39:44 +01:00
parent 18f8a92084
commit cb745c3c3e
1 changed files with 2 additions and 1 deletions

View File

@ -282,7 +282,8 @@ def _get_logic_functions(module_root, logic_functions = {}):
module = getattr(module, part) module = getattr(module, part)
for key, value in module.__dict__.items(): for key, value in module.__dict__.items():
if not key.startswith('_') and isinstance(value, types.FunctionType): if not key.startswith('_') and (hasattr(value, '__call__')
and (value.__module__ == module_path)):
logic_functions[key] = value logic_functions[key] = value
return logic_functions return logic_functions