Fixed rnstatus JSON output error

This commit is contained in:
Mark Qvist 2023-03-08 14:10:33 +01:00
parent af8edc335b
commit 159c7a9a52

View File

@ -58,6 +58,16 @@ def program_setup(configdir, dispall=False, verbosity=0, name_filter=None,json=F
if stats != None:
if json:
import json
for s in stats:
if isinstance(stats[s], bytes):
stats[s] = RNS.hexrep(stats[s], delimit=False)
for i in stats[s]:
if isinstance(i, dict):
for k in i:
if isinstance(i[k], bytes):
i[k] = RNS.hexrep(i[k], delimit=False)
print(json.dumps(stats))
exit()