Refactor main.py. No longer need to change it if a new plugin is added (except for the command line)

pull/1073/head
nicolargo 2017-03-27 17:54:02 +02:00
parent 9ca9665d7f
commit e3d7dd26d3
1 changed files with 1 additions and 14 deletions

View File

@ -367,20 +367,7 @@ Examples of use:
self.args = args
# Export is only available in standalone or client mode (issue #614)
export_tag = (
args.export_csv or
args.export_cassandra or
args.export_couchdb or
args.export_elasticsearch or
args.export_influxdb or
args.export_kafka or
args.export_opentsdb or
args.export_prometheus or
args.export_rabbitmq or
args.export_riemann or
args.export_statsd or
args.export_zeromq
)
export_tag = any([getattr(args, a) for a in args.__dict__ if a.startswith('export_')])
if WINDOWS and export_tag:
# On Windows, export is possible but only in quiet mode
# See issue #1038