From 535ede4d15a94939c78331ba272497179e27ccf7 Mon Sep 17 00:00:00 2001 From: nrwahl2 <30487349+nrwahl2@users.noreply.github.com> Date: Sat, 19 Aug 2017 22:28:30 -0500 Subject: [PATCH] Fixes #28444: Renamed function print_match to match_print due to variable name conflict (#28445) * Fixes #28444: Renamed print_match function to match_print due to name conflict * Rename `match_print` to `do_print_match` I think this is less confusing. --- lib/ansible/modules/files/xml.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100755 => 100644 lib/ansible/modules/files/xml.py diff --git a/lib/ansible/modules/files/xml.py b/lib/ansible/modules/files/xml.py old mode 100755 new mode 100644 index 080e24a549..172723909e --- a/lib/ansible/modules/files/xml.py +++ b/lib/ansible/modules/files/xml.py @@ -244,7 +244,7 @@ _RE_SPLITSUBLAST = re.compile("^(.*)/(" + _NSIDENT + ")\\[(.*)\\]$") _RE_SPLITONLYEQVALUE = re.compile("^(.*)/text\\(\\)=" + _XPSTR + "$") -def print_match(module, tree, xpath, namespaces): +def do_print_match(module, tree, xpath, namespaces): match = tree.xpath(xpath, namespaces=namespaces) match_xpaths = [] for m in match: @@ -705,7 +705,7 @@ def main(): module.fail_json(msg="Error while parsing path: %s" % e) if print_match: - print_match(module, doc, xpath, namespaces) + do_print_match(module, doc, xpath, namespaces) if count: count_nodes(module, doc, xpath, namespaces)