Strip leading and trailing whitespace for json arg types

pull/15784/head
Toshio Kuratomi 9 years ago
parent 30e5999812
commit 409bfe4d0f

@ -1400,7 +1400,7 @@ class AnsibleModule(object):
# Return a jsonified string. Sometimes the controller turns a json # Return a jsonified string. Sometimes the controller turns a json
# string into a dict/list so transform it back into json here # string into a dict/list so transform it back into json here
if isinstance(value, (unicode, bytes)): if isinstance(value, (unicode, bytes)):
return value 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)

Loading…
Cancel
Save