summaryrefslogtreecommitdiffstats
path: root/func
diff options
context:
space:
mode:
authorLuke Macken <lmacken@redhat.com>2008-01-15 18:58:43 -0500
committerLuke Macken <lmacken@redhat.com>2008-01-15 18:58:43 -0500
commitedbdbfb8bafd8510976bbc71b1f6672bd2fb5018 (patch)
treeb808f3b97c820cb6e8b5c40f325134b6c368a806 /func
parentf1fe3fa3ca574a54563cd2cf2e967e87558edeb4 (diff)
downloadthird_party-func-edbdbfb8bafd8510976bbc71b1f6672bd2fb5018.tar.gz
third_party-func-edbdbfb8bafd8510976bbc71b1f6672bd2fb5018.tar.xz
third_party-func-edbdbfb8bafd8510976bbc71b1f6672bd2fb5018.zip
Combine our is{class,subclass} checks into a single conditional
Diffstat (limited to 'func')
-rwxr-xr-xfunc/minion/module_loader.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/func/minion/module_loader.py b/func/minion/module_loader.py
index f8f8f42..37bc515 100755
--- a/func/minion/module_loader.py
+++ b/func/minion/module_loader.py
@@ -85,10 +85,9 @@ def load_modules(blacklist=None):
blip = __import__("modules.%s" % ( mod_imp_name), globals(), locals(), [mod_imp_name])
for obj in dir(blip):
attr = getattr(blip, obj)
- if isclass(attr):
- if issubclass(attr, func_module.FuncModule):
- logger.debug("Loading %s module" % attr)
- mods[mod_imp_name] = attr()
+ if isclass(attr) and issubclass(attr, func_module.FuncModule):
+ logger.debug("Loading %s module" % attr)
+ mods[mod_imp_name] = attr()
except ImportError, e:
# A module that raises an ImportError is (for now) simply not loaded.