From bb31e0ae812d5f1fec9b1cca5a3924e20039862c Mon Sep 17 00:00:00 2001 From: Sven Velt Date: Tue, 15 Dec 2009 00:11:40 +0100 Subject: [PATCH] Fix "file -1 seconds old" bug --- nagixsc_xml2nagios.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nagixsc_xml2nagios.py b/nagixsc_xml2nagios.py index 868bca5..58d5c07 100755 --- a/nagixsc_xml2nagios.py +++ b/nagixsc_xml2nagios.py @@ -92,11 +92,12 @@ elif options.mode == 'active': ############################################################################## -now = int(datetime.datetime.now().strftime('%s')) - # Get URL or file doc = read_xml(options) +# Now timestamp AFTER getting the XML file +now = int(datetime.datetime.now().strftime('%s')) + # Check XML against DTD if options.schemacheck: -- 2.30.2