Module: check_mk
Branch: master
Commit: 28ffbdf09df2afdce4b1e32f7967dfd98ca65c80
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=28ffbdf09df2af…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Thu Nov 13 17:31:17 2014 +0100
extract_inventory.py: adapt script to the presence of extra files in
var/check_mk/inventory
---
doc/treasures/inventory/extract_inventory.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/doc/treasures/inventory/extract_inventory.py
b/doc/treasures/inventory/extract_inventory.py
index 9b53aae..5055f4a 100755
--- a/doc/treasures/inventory/extract_inventory.py
+++ b/doc/treasures/inventory/extract_inventory.py
@@ -224,6 +224,9 @@ def list_get(hostname, list_start):
all_data = {}
inventory_date = {}
for hostname in os.listdir(inv_dir):
+ # ignore gziped files and invisible files in directory for now
+ if hostname.endswith(".gz") or hostname.startswith("."):
+ continue
fn = inv_dir + hostname
if os.path.isfile(fn):
a = eval(open(fn,'r').read())