Module: check_mk
Branch: master
Commit: 5a865f8f40810e80c839222605e3dd52aeb11d39
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5a865f8f40810e…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Wed Dec 17 13:12:27 2014 +0100
extract_inventory.py: regexes are now allowed in filters
---
doc/treasures/inventory/extract_inventory.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/doc/treasures/inventory/extract_inventory.py
b/doc/treasures/inventory/extract_inventory.py
index 5055f4a..6f923c1 100755
--- a/doc/treasures/inventory/extract_inventory.py
+++ b/doc/treasures/inventory/extract_inventory.py
@@ -148,7 +148,8 @@ def filt_it(package, relation):
field = re.sub(list_start+":\*.", "", field)
for item in field.split("."):
value = package[item]
- if type(value) in (str, int, float) and value == should_be:
+ if type(value) in (str, int, float) and re.search(should_be, value):
+
return False
return True