From: Sven Velt Date: Mon, 14 Dec 2009 23:11:40 +0000 (+0100) Subject: Fix "file -1 seconds old" bug X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=bb31e0ae812d5f1fec9b1cca5a3924e20039862c;p=nagixsc.git Fix "file -1 seconds old" bug --- 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: