From cb745c3c3e61d5811f1ea51793ec7adf84c88795 Mon Sep 17 00:00:00 2001 From: amercader Date: Mon, 5 Aug 2013 18:39:44 +0100 Subject: [PATCH] Avoid importing unnecessary functions from the harvest logic --- ckanext/harvest/plugin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ckanext/harvest/plugin.py b/ckanext/harvest/plugin.py index 48918b20e..abfb66b69 100644 --- a/ckanext/harvest/plugin.py +++ b/ckanext/harvest/plugin.py @@ -282,7 +282,8 @@ def _get_logic_functions(module_root, logic_functions = {}): module = getattr(module, part) 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 return logic_functions