mirror of
https://github.com/nicolargo/glances.git
synced 2024-08-17 00:10:48 +03:00
Glances API Documentation displays non valid json (Issue #2036)
This commit is contained in:
parent
96c6faf473
commit
0bea6fd43b
@ -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():
|
||||
|
Loading…
Reference in New Issue
Block a user