diff options
author | Adrian Likins <alikins@grimlock.devel.redhat.com> | 2007-10-26 15:13:14 -0400 |
---|---|---|
committer | Adrian Likins <alikins@grimlock.devel.redhat.com> | 2007-10-26 15:13:14 -0400 |
commit | d7f4a0ebebe416084ec726d38f485246aa88e886 (patch) | |
tree | 95c1afa39d22fe9d17d7e0e230337fce0b9ad071 /func | |
parent | c775e11d5be9253de8daeba4d2be2067ef1c9f54 (diff) | |
download | third_party-func-d7f4a0ebebe416084ec726d38f485246aa88e886.tar.gz third_party-func-d7f4a0ebebe416084ec726d38f485246aa88e886.tar.xz third_party-func-d7f4a0ebebe416084ec726d38f485246aa88e886.zip |
log this stuff as a warning, don't print to stdout since
that just seems to alarm people
Diffstat (limited to 'func')
-rwxr-xr-x | func/minion/module_loader.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/func/minion/module_loader.py b/func/minion/module_loader.py index 76eed43..b29f57c 100755 --- a/func/minion/module_loader.py +++ b/func/minion/module_loader.py @@ -22,6 +22,10 @@ from gettext import gettext _ = gettext +from func import logger +logger = logger.Logger().logger + + def module_walker(topdir): module_files = [] for root, dirs, files in os.walk(topdir): @@ -81,19 +85,19 @@ def load_modules(blacklist=None): blip = __import__("modules.%s" % ( mod_imp_name), globals(), locals(), [mod_imp_name]) if not hasattr(blip, "register_rpc"): errmsg = _("%(module_path)s%(modname)s module not a proper module") - print errmsg % {'module_path': module_file_path, 'modname':mod_imp_name} + logger.warning(errmsg % {'module_path': module_file_path, 'modname':mod_imp_name}) bad_mods[mod_imp_name] = True continue mods[mod_imp_name] = blip except ImportError, e: # A module that raises an ImportError is (for now) simply not loaded. errmsg = _("Could not load %s module: %s") - print errmsg % (mod_imp_name, e) + logger.warning(errmsg % (mod_imp_name, e)) bad_mods[mod_imp_name] = True continue except: errmsg = _("Could not load %s module") - print errmsg % (mod_imp_name) + logger.warning(errmsg % (mod_imp_name)) bad_mods[mod_imp_name] = True continue |