0002-remove-check-for-self.options.modules-from-grep-subc.patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




In the grep subcommand, it was failing to work if no modules were specified. Original
intent was to scan all modules with .grep() support in this case.

So, I'm not sure this is the correct fix. I don't completely understand why
it was changed, so it's entirely possible this reintroduces an already fixed bug, but
it seems to work for me.


Adrian
>From fead2c4881ad8c68f80815492320a2f6a619b98c Mon Sep 17 00:00:00 2001
From: Adrian Likins <alikins@xxxxxxxxxx>
Date: Tue, 18 May 2010 12:40:20 -0400
Subject: [PATCH 2/2] remove check for self.options.modules from grep subcommand.

We were checking for existing of self.options.modules here, so
this wasn't working in cases where no specific module was
specfied. Original intended behavior was to scan all modules
that supported .grep(). It's possible this causes problems
currently, but seems to work for me.
---
 func/overlord/cmd_modules/grep.py |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/func/overlord/cmd_modules/grep.py b/func/overlord/cmd_modules/grep.py
index db60cd6..0dddbf0 100644
--- a/func/overlord/cmd_modules/grep.py
+++ b/func/overlord/cmd_modules/grep.py
@@ -92,8 +92,7 @@ class Grep(base_command.BaseCommand):
             host_only_mc.get_all_hosts()
             self.overlord_obj.minions_class = host_only_mc
             for module in host_modules[host]:
-                if self.options.modules and module in self.options.modules:
-                    if self.options.verbose:
+		    if self.options.verbose:
                         print "Scanning module: %s on host: %s" %(module, host)
                     
                     tmp_res = self.overlord_obj.run(module,"grep",[self.word])
-- 
1.6.2.5

_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list

[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux