Merge pull request #1126 from dagwieers/choices-fix

Fix to make sure only strings are being joined
pull/1128/merge
Michael DeHaan 12 years ago
commit 08a77135f3

@ -173,7 +173,7 @@ class AnsibleModule(object):
if type(choices) == list: if type(choices) == list:
if k in self.params: if k in self.params:
if self.params[k] not in choices: 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]) msg="value of %s must be one of: %s, got: %s" % (k, choices_str, self.params[k])
self.fail_json(msg=msg) self.fail_json(msg=msg)
else: else:

Loading…
Cancel
Save