1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-16 09:10:35 +03:00

Replaced file.write(json.dumps()) with json.dump

There's no reason to use json.dumps and directly encode it when we can
let the json lib do the heavy lifting
This commit is contained in:
A_D 2020-07-24 12:43:40 +02:00 committed by Athanasius
parent 566f52e61f
commit 64b9cb39a9

View File

@ -184,8 +184,8 @@ def main():
# stuff we can do when not docked
if args.d:
with open(args.d, 'wb') as h:
h.write(json.dumps(data, ensure_ascii=False, indent=2, sort_keys=True, separators=(',', ': ')).encode('utf-8'))
with open(args.d, 'w') as f:
json.dump(data, f, ensure_ascii=False, indent=2, sort_keys=True, separators=(',', ': '))
if args.a:
loadout.export(data, args.a)