Skip to content
Snippets Groups Projects
Commit 89328422 authored by Thomas Woerner's avatar Thomas Woerner
Browse files

ansible_freeipa_module: Convert tuple to list in compare_args_ipa

The conversion is needed because older FreeIPA versions are returning
tuples in some cases instead of lists. To be able to compare them the
conversion to a list is needed.
parent b1a84271
Branches
Tags
No related merge requests found
...@@ -183,6 +183,8 @@ def compare_args_ipa(module, args, ipa): ...@@ -183,6 +183,8 @@ def compare_args_ipa(module, args, ipa):
# If ipa_arg is a list and arg is not, replace arg # If ipa_arg is a list and arg is not, replace arg
# with list containing arg. Most args in a find result # with list containing arg. Most args in a find result
# are lists, but not all. # are lists, but not all.
if isinstance(ipa_arg, tuple):
ipa_arg = list(ipa_arg)
if isinstance(ipa_arg, list) and not isinstance(arg, list): if isinstance(ipa_arg, list) and not isinstance(arg, list):
arg = [arg] arg = [arg]
# module.warn("%s <=> %s" % (arg, ipa_arg)) # module.warn("%s <=> %s" % (arg, ipa_arg))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment