Merge pull request #1126 from dagwieers/choices-fix

Fix to make sure only strings are being joined
This commit is contained in:
Michael DeHaan 2012-09-28 16:12:17 -07:00
commit 08a77135f3

View file

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