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:
parent
566f52e61f
commit
64b9cb39a9
4
EDMC.py
4
EDMC.py
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user