"""
:Author: Daniel Mohr
:Email: daniel.mohr@dlr.de
:Date: 2021-02-08 (last change).
:License: GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007.
"""
import json
def print_json_output(result, output_format):
"""
:Author: Daniel Mohr
:Email: daniel.mohr@dlr.de
:Date: 2021-02-08 (last change).
prints the output
"""
if 'json' in output_format:
print(json.dumps(result))
elif 'json1' in output_format:
print(json.dumps(result, indent=1))
23 ↛ exitline 23 didn't return from function 'print_json_output', because the condition on line 23 was never false elif 'human_readable' in output_format:
print(json.dumps(result, indent=1))
|