diff --git a/nagixsc_xml2nagios.py b/nagixsc_xml2nagios.py
index 96b6a522b6090c3e9055c2ef7fca84b92b82cf54..f16c8a832278d51d6786d4df13e10267d9df4094 100755 (executable)
--- a/nagixsc_xml2nagios.py
+++ b/nagixsc_xml2nagios.py
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)