mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
* 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.
This commit is contained in:
4
lib/ansible/modules/files/xml.py
Executable file → Normal file
4
lib/ansible/modules/files/xml.py
Executable file → Normal file
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user