1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-06-09 03:42:16 +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 # stuff we can do when not docked
if args.d: if args.d:
with open(args.d, 'wb') as h: with open(args.d, 'w') as f:
h.write(json.dumps(data, ensure_ascii=False, indent=2, sort_keys=True, separators=(',', ': ')).encode('utf-8')) json.dump(data, f, ensure_ascii=False, indent=2, sort_keys=True, separators=(',', ': '))
if args.a: if args.a:
loadout.export(data, args.a) loadout.export(data, args.a)