Skip to content

Commit

Permalink
fix parse_xml
Browse files Browse the repository at this point in the history
  • Loading branch information
KB-perByte committed Aug 9, 2023
1 parent f37409e commit b546f32
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/plugin_utils/parse_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand All @@ -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

Expand Down

0 comments on commit b546f32

Please sign in to comment.