diff options
author | nicolargo <nicolas@nicolargo.com> | 2017-03-27 17:54:02 +0200 |
---|---|---|
committer | nicolargo <nicolas@nicolargo.com> | 2017-03-27 17:54:02 +0200 |
commit | e3d7dd26d39fc30151a2880541b7381161b63a5e (patch) | |
tree | ce2f8bac21c3e0c3e9374c614b03ad2c914bcc6a | |
parent | 9ca9665d7fd2bafb80a57c5ff5eb4556b817c587 (diff) |
Refactor main.py. No longer need to change it if a new plugin is added (except for the command line)
-rw-r--r-- | glances/main.py | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/glances/main.py b/glances/main.py index a82410ad..141addc3 100644 --- a/glances/main.py +++ b/glances/main.py @@ -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 |