diff options
author | Martin Sivak <msivak@redhat.com> | 2008-09-08 12:40:09 +0200 |
---|---|---|
committer | Martin Sivak <msivak@redhat.com> | 2008-09-08 12:51:38 +0200 |
commit | ee3736fe22286948e4823f3f1fc866f477f882dd (patch) | |
tree | 913ca08016b19a73c00442ff0ad123b3e7cc855b /pyfirstaidkit/plugins.py | |
parent | ea990d0225a87c90d71edbbb08d68e439bcfddc6 (diff) | |
download | firstaidkit-ee3736fe22286948e4823f3f1fc866f477f882dd.tar.gz firstaidkit-ee3736fe22286948e4823f3f1fc866f477f882dd.tar.xz firstaidkit-ee3736fe22286948e4823f3f1fc866f477f882dd.zip |
Enable prer flow arguments
Diffstat (limited to 'pyfirstaidkit/plugins.py')
-rw-r--r-- | pyfirstaidkit/plugins.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/pyfirstaidkit/plugins.py b/pyfirstaidkit/plugins.py index 3dda77c..65ef049 100644 --- a/pyfirstaidkit/plugins.py +++ b/pyfirstaidkit/plugins.py @@ -602,20 +602,23 @@ class PluginSystem(object): message = plugin) return False - args = None + args = [] if Config.has_section("plugin-args"): for (name, value) in Config.items("plugin-args"): # We see if the args line begins with any plugin name. - m = re.search("^%s"%plugin, value) + m = re.search("^%s "%plugin, value) if m: - args = value.strip(plugin).strip(" ") - break + args.append(value.strip(plugin).strip(" ")) + # We also want to be able to configure separate flows + m = re.search("^%s/%s "% (plugin, flowName), value) + if m: + args.append(value.strip(plugin).strip(" ")) infosection = getattr(Info, plugin) infosection.unlock() p = pklass(flowName, reporting = self._reporting, dependencies = self._deps, backups = self._backups, - path = plugindir, info = infosection, args = args) + path = plugindir, info = infosection, args = " ".join(args)) for (step, rv) in p: #autorun all the needed steps Logger.info("Running step %s in plugin %s ...", step, plugin) Logger.info("%s is current step and %s is result of that step." % |