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.
pull/28452/head
nrwahl2 7 years ago committed by Dag Wieers
parent b9cee65756
commit 535ede4d15

@ -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)

Loading…
Cancel
Save