From b546f3292aecda2882ef99cd6321522d470a37da Mon Sep 17 00:00:00 2001 From: KB-perByte Date: Wed, 9 Aug 2023 12:58:16 +0530 Subject: [PATCH] fix parse_xml --- plugins/plugin_utils/parse_xml.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/plugin_utils/parse_xml.py b/plugins/plugin_utils/parse_xml.py index 630b93886..e563c7561 100644 --- a/plugins/plugin_utils/parse_xml.py +++ b/plugins/plugin_utils/parse_xml.py @@ -132,7 +132,7 @@ def parse_xml(output, tmpl): root = fromstring(output) try: - tmpl = Template() + template = Template() except ImportError as exc: raise AnsibleFilterError(to_native(exc)) @@ -147,12 +147,12 @@ def parse_xml(output, tmpl): try: variables = spec.get("vars", {}) - value = tmpl(value, variables) + value = template(value, variables) except Exception: pass if "items" in attrs: - obj[name] = _extract_param(tmpl, root, attrs, value) + obj[name] = _extract_param(template, root, attrs, value) else: obj[name] = value