Code

Filter out host check if -D specified
authorSven Velt <sven@velt.de>
Tue, 23 Mar 2010 16:40:38 +0000 (17:40 +0100)
committerSven Velt <sven@velt.de>
Tue, 23 Mar 2010 16:40:38 +0000 (17:40 +0100)
Signed-off-by: Sven Velt <sven@velt.de>
nagixsc/__init__.py

index 54a2125519fb1b8dd86d7c1ded8af7cf140dd38a..ba961828b503887a2513e6f48d3295c8526eae68 100644 (file)
@@ -306,7 +306,8 @@ def xml_to_dict(xmldoc, verb=0, hostfilter=None, servicefilter=None):
                else:
                        timestamp = filetimestamp
 
-               if retcode and output:
+               # Append only if no service filter
+               if not servicefilter and retcode and output:
                        checks.append({'host_name':hostname, 'service_description':None, 'returncode':retcode, 'output':output, 'timestamp':timestamp})