From 9143ca7443a01a28304a1471af4436ae2bc6f630 Mon Sep 17 00:00:00 2001 From: Sven Velt Date: Tue, 23 Feb 2010 16:10:27 +0100 Subject: [PATCH] Small fix if run in "checkresult" mode Signed-off-by: Sven Velt --- nagixsc_xml2nagios.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nagixsc_xml2nagios.py b/nagixsc_xml2nagios.py index 96b6a52..f16c8a8 100755 --- a/nagixsc_xml2nagios.py +++ b/nagixsc_xml2nagios.py @@ -160,9 +160,10 @@ if options.mode == 'passive' or options.mode == 'passive_check': elif options.mode.startswith('checkresult'): (count_services, count_failed, list_failed) = dict2out_checkresult(checks, xml_get_timestamp(doc), options.checkresultdir, options.verb) - if list_failed and options.mode == 'checkresult': - for entry in list_failed: - print 'Could not write checkresult files "%s(.ok)" for "%s"/"%s"!' % (entry[0], entry[1], entry[2]) + if options.mode == 'checkresult': + if list_failed: + for entry in list_failed: + print 'Could not write checkresult files "%s(.ok)" for "%s"/"%s"!' % (entry[0], entry[1], entry[2]) if count_failed == 0: sys.exit(0) -- 2.30.2