[PATCH 3/5] Restrict known_hooks to only sub-directories of hookdir

James Laska jlaska at redhat.com
Fri Sep 17 13:37:46 UTC 2010


---
 autoqa |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/autoqa b/autoqa
index e6bd8c9..56aea8e 100755
--- a/autoqa
+++ b/autoqa
@@ -181,7 +181,8 @@ if not os.path.isdir(conf['hookdir']):
     print "Can't find hooks in %s. Check your installation." % conf['hookdir']
     sys.exit(1)
 # known hooks = dirs in hookdir
-known_hooks = [d for d in os.listdir(conf['hookdir'])]
+# FIXME - would be nice to have some way to determine what makes a hook valid
+known_hooks = [d for d in os.listdir(conf['hookdir']) if os.path.isdir(os.path.join(conf['hookdir'], d))]
 
 # Set up the option parser
 parser = optparse.OptionParser(usage="%prog HOOKNAME [options] ...", 
-- 
1.7.2.3



More information about the autoqa-devel mailing list