From 413bdbf80e25aefdc2f6f036380fc9217073536f Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sun, 6 Jan 2013 17:17:26 +0100 Subject: [PATCH] supybot-test: Add the --exclude option. --- scripts/supybot-test | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/supybot-test b/scripts/supybot-test index be7e15902..52b4ad426 100644 --- a/scripts/supybot-test +++ b/scripts/supybot-test @@ -142,13 +142,17 @@ if __name__ == '__main__': action='append', dest='pluginsDirs', default=[], help='Looks in in the given directory for plugins and ' 'loads the tests from all of them.') + parser.add_option('', '--exclude', + action='append', dest='excludePlugins', default=[], + help='List of plugins you do not want --plugins-dir ' + 'to include.') (options, args) = parser.parse_args() # This must go before checking for args, of course. for pluginDir in options.pluginsDirs: for name in glob.glob(os.path.join(pluginDir, '*')): #print '***', name - if os.path.isdir(name): + if name not in options.excludePlugins and os.path.isdir(name): args.append(name) if not args: