added flag to exclude/disable plugins
@@ -1128,6 +1128,10 @@ def _load_plugins(options, config):
else:
plugin_list = config['plugins'].as_str_seq()
+ # Exclude any plugins that were specified on the command line
+ if options.exclude is not None:
+ plugin_list = [p for p in plugin_list if p not in options.exclude.split(',')]
+
plugins.load_plugins(plugin_list)
return plugins
@@ -1261,6 +1265,8 @@ def _raw_main(args, lib=None):
help='path to configuration file')
parser.add_option('-p', '--plugins', dest='plugins',
help='a comma-separated list of plugins to load')
+ parser.add_option('-x', '--exclude', dest='exclude',
+ help='a comma-separated list of plugins to disable')
parser.add_option('-h', '--help', dest='help', action='store_true',
help='show this help message and exit')
parser.add_option('--version', dest='version', action='store_true',
