Commit 08a77135 by Michael DeHaan

Merge pull request #1126 from dagwieers/choices-fix

Fix to make sure only strings are being joined
parents 508e6ecf 27b2ae8d
......@@ -173,7 +173,7 @@ class AnsibleModule(object):
if type(choices) == list:
if k in self.params:
if self.params[k] not in choices:
choices_str=",".join(choices)
choices_str=",".join([str(c) for c in choices])
msg="value of %s must be one of: %s, got: %s" % (k, choices_str, self.params[k])
self.fail_json(msg=msg)
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment