Glances API Documentation displays non valid json (Issue #2036)

This commit is contained in:
nicolargo 2022-04-21 10:46:07 +02:00
parent 96c6faf473
commit 0bea6fd43b

View File

@ -48,9 +48,9 @@ def indent_stat(stat, indent=' '):
# Indent stats to pretty print it
if isinstance(stat, list) and len(stat) > 1 and isinstance(stat[0], dict):
# Only display two first items
return indent + pformat(stat[0:2]).replace('\n', '\n' + indent)
return indent + pformat(stat[0:2]).replace('\n', '\n' + indent).replace("'", '"')
else:
return indent + pformat(stat).replace('\n', '\n' + indent)
return indent + pformat(stat).replace('\n', '\n' + indent).replace("'", '"')
def print_api_status():