commit 9a05e53a396761f4a0505b1ac2c7408f5af5bba5
Author: Jan Tluka <jtluka(a)redhat.com>
Date: Fri Sep 6 11:24:21 2013 +0200
Fix template indexing bug
I found a bug causing template functions to strip one character
immediately following the template function string, e.g.
"{ip(load-balancer,pub1)}:80"
will result in stripping the colon:
192.168.210.580
instead of
192.168.210.5:80
This patch fixes that.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
lnst/Common/XmlTemplates.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/lnst/Common/XmlTemplates.py b/lnst/Common/XmlTemplates.py
index daa1254..57acf00 100644
--- a/lnst/Common/XmlTemplates.py
+++ b/lnst/Common/XmlTemplates.py
@@ -320,7 +320,7 @@ class XmlTemplates:
func_match = re.search(self._func_re, string)
if func_match:
prefix = string[0:func_match.start(0)]
- suffix = string[func_match.end(0)+1:]
+ suffix = string[func_match.end(0):]
template = func_match.group(0)
func = self._process_func_template(template)
Show replies by date