mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-09 11:52:27 +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
|
# 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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user