Module: check_mk
Branch: master
Commit: 7556c729ceebcf427571dea229d47b2da862940a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7556c729ceebcf…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu May 21 10:11:00 2015 +0200
Fixed exception in regex based piggyback translation
---
modules/check_mk_base.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index 83a5842..4d42ed6 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -660,10 +660,10 @@ def translate_piggyback_host(sourcehost, backedhost):
# 3. Regular expression conversion
if "regex" in translation:
- regex, subst = translation.get("regex")
- if not regex.endswith('$'):
- regex += '$'
- rcomp = regex(regex)
+ expr, subst = translation.get("regex")
+ if not expr.endswith('$'):
+ expr += '$'
+ rcomp = regex(expr)
mo = rcomp.match(backedhost)
if mo:
backedhost = subst