From 493b71d9f00b173e5714fd79c2c112a8d5a56dba Mon Sep 17 00:00:00 2001 From: Simone Rossetto Date: Tue, 8 Dec 2020 17:06:10 +0100 Subject: [PATCH] Plugin timesync_status: use common pattern to check input args --- plugins/systemd/timesync_status | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/systemd/timesync_status b/plugins/systemd/timesync_status index d631eee0..63eb8ec8 100755 --- a/plugins/systemd/timesync_status +++ b/plugins/systemd/timesync_status @@ -132,9 +132,9 @@ def config(): if __name__ == '__main__': - if len(sys.argv) == 1 or sys.argv[1] == 'fetch': - retrieve() - elif sys.argv[1] == 'config': + if len(sys.argv) > 1 and sys.argv[1] == 'config': config() - elif sys.argv[1] == 'autoconf': + elif len(sys.argv) > 1 and sys.argv[1] == 'autoconf': autoconf() + else: + retrieve()