diff options
author | Joel Andres Granados <jgranado@redhat.com> | 2008-08-08 17:23:51 +0200 |
---|---|---|
committer | Joel Andres Granados <jgranado@redhat.com> | 2008-08-08 17:58:51 +0200 |
commit | d2ac990fae74934887cba6a01ed5bb6d6c576422 (patch) | |
tree | 6f116352651fee9916fdf84f2792fe1e6ab7923d /firstaidkit | |
parent | 90054c1550faaef35623979d23421b295262ffbf (diff) | |
download | firstaidkit-d2ac990fae74934887cba6a01ed5bb6d6c576422.tar.gz firstaidkit-d2ac990fae74934887cba6a01ed5bb6d6c576422.tar.xz firstaidkit-d2ac990fae74934887cba6a01ed5bb6d6c576422.zip |
Make the argument passing more general.
It is possible for the plugin name to have a space. when this
occured it threw off the argument detecting logic. This new
way of detecting the plugin name is more general.
Diffstat (limited to 'firstaidkit')
-rwxr-xr-x | firstaidkit | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/firstaidkit b/firstaidkit index 723c640..e25c1f7 100755 --- a/firstaidkit +++ b/firstaidkit @@ -16,7 +16,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -import sys, getopt, os, pprint, logging, re +import sys, getopt, os, pprint, logging, re, hashlib from threading import Thread from pyfirstaidkit import Tasker from pyfirstaidkit import Config @@ -228,15 +228,9 @@ if __name__=="__main__": Config.operation.dependencies = "False" elif key in ("--plugin-args"): - m = re.search("[^ ]* ", val) - if m: - plugin = m.group(0).strip() - args = val.strip("%s "%plugin) - if plugin and args: - if not Config.has_section("plugin-args"): - Config.add_section("plugin-args") - Config.set("plugin-args", plugin, args) - + if not Config.has_section("plugin-args"): + Config.add_section("plugin-args") + Config.set("plugin-args", hashlib.sha1(val).hexdigest(), val) if Flags.main_help: usage(sys.argv[0]) |