Code

Fix "file -1 seconds old" bug
authorSven Velt <sven@velt.de>
Mon, 14 Dec 2009 23:11:40 +0000 (00:11 +0100)
committerSven Velt <sven@velt.de>
Mon, 14 Dec 2009 23:11:40 +0000 (00:11 +0100)
nagixsc_xml2nagios.py

index 868bca5e49630ff662d187d5ee04a4b1845330c7..58d5c0707e9bdb86a79bdc27ea52cdc7bbec7cbf 100755 (executable)
@@ -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: