mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-02 16:53:11 +00:00
jsonify needs to return a string of {}, rather than a dict
This commit is contained in:
@@ -122,7 +122,7 @@ def jsonify(result, format=False):
|
||||
''' format JSON output (uncompressed or uncompressed) '''
|
||||
|
||||
if result is None:
|
||||
return {}
|
||||
return "{}"
|
||||
result2 = result.copy()
|
||||
if format:
|
||||
return json.dumps(result2, sort_keys=True, indent=4)
|
||||
|
||||
Reference in New Issue
Block a user