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 authored and Athanasius committed 2020-07-26 23:08:47 +01:00
1 parent 566f52e61f
commit 64b9cb39a9
1 file changed
+2 -2
+2 -2
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)