1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix syntax error in json/jsonarg type parser

The lack of a comma caused the statement to always evaluate as a
`TypeError` when python interpreted `value (list, tuple, dict)` to call
value with the arguments list, tuple, and dict.
This commit is contained in:
Ryan S. Brown 2016-07-28 15:54:09 -04:00
parent 409d95d67e
commit bed24689ec

View file

@ -1474,7 +1474,7 @@ class AnsibleModule(object):
if isinstance(value, (unicode, bytes)): if isinstance(value, (unicode, bytes)):
return value.strip() return value.strip()
else: else:
if isinstance(value (list, tuple, dict)): if isinstance(value, (list, tuple, dict)):
return json.dumps(value) return json.dumps(value)
raise TypeError('%s cannot be converted to a json string' % type(value)) raise TypeError('%s cannot be converted to a json string' % type(value))