1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Plugin timesync_status: use common pattern to check input args

This commit is contained in:
Simone Rossetto 2020-12-08 17:06:10 +01:00 committed by Lars Kruse
parent 0e43e7790f
commit 493b71d9f0

View file

@ -132,9 +132,9 @@ def config():
if __name__ == '__main__': if __name__ == '__main__':
if len(sys.argv) == 1 or sys.argv[1] == 'fetch': if len(sys.argv) > 1 and sys.argv[1] == 'config':
retrieve()
elif sys.argv[1] == 'config':
config() config()
elif sys.argv[1] == 'autoconf': elif len(sys.argv) > 1 and sys.argv[1] == 'autoconf':
autoconf() autoconf()
else:
retrieve()