From 864a481f5e28eeb9f08a15baef0cf2edeb4d1971 Mon Sep 17 00:00:00 2001 From: Dick Visser Date: Mon, 30 Mar 2020 16:58:45 +0200 Subject: [PATCH] Fix issue with trailing args. Also fix append issue --- nagios-testssl.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nagios-testssl.py b/nagios-testssl.py index c0f6936..ffa33f3 100755 --- a/nagios-testssl.py +++ b/nagios-testssl.py @@ -64,12 +64,14 @@ def nagios_exit(message, code): # Set command and arguments subproc_args = [ testssl, + '--append', '--jsonfile-pretty', temp_path, ] # Remove '--' separator from the trailing arguments - trailing_args.remove('--') + if '--' in trailing_args: + trailing_args.remove('--') # Add the trailing arguments subproc_args.extend(trailing_args)