diff options
author | Krzysztof A. Adamski <krzysztofa@gmail.com> | 2008-08-08 19:14:44 -0400 |
---|---|---|
committer | Krzysztof A. Adamski <krzysztofa@gmail.com> | 2008-08-08 19:14:44 -0400 |
commit | 64f3512546392a34af79f741a3408307d3c31a79 (patch) | |
tree | f48b8428a3462e944163e81a8356064b263b23a8 /func | |
parent | 17252fe8ef42fc27f922b8211178a460c8ee73f7 (diff) | |
download | func-64f3512546392a34af79f741a3408307d3c31a79.tar.gz func-64f3512546392a34af79f741a3408307d3c31a79.tar.xz func-64f3512546392a34af79f741a3408307d3c31a79.zip |
Only pass parent_class when it's not None.
Diffstat (limited to 'func')
-rwxr-xr-x | func/module_loader.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/func/module_loader.py b/func/module_loader.py index 6f2f0e8..2aa1378 100755 --- a/func/module_loader.py +++ b/func/module_loader.py @@ -96,7 +96,10 @@ def load_modules(path='func/minion/modules/', main_class=func_module.FuncModule, attr = getattr(blip, obj) if isclass(attr) and issubclass(attr, main_class): logger.debug("Loading %s module" % attr) - mods[mod_imp_name] = attr(parent_class) + if parent_class: + mods[mod_imp_name] = attr(parent_class) + else: + mods[mod_imp_name] = attr() except ImportError, e: # A module that raises an ImportError is (for now) simply not loaded. |