1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-15 00:30:33 +03:00

EDDNSender: Convert all of a legacy file

* I had a `break` in there to only convert the first message.
* Also collapsed the assignment to `cmdr, msg` to not go via `j`.
This commit is contained in:
Athanasius 2022-09-29 16:39:30 +01:00 committed by Athanasius
parent 089c33002c
commit 86ff787aed
No known key found for this signature in database
GPG Key ID: 772697E181BB2767

View File

@ -260,10 +260,8 @@ class EDDNSender:
filename = config.app_dir_path / 'replay.jsonl'
with open(filename, 'r+', buffering=1) as replay_file:
for line in replay_file:
j = json.loads(line)
cmdr, msg = j
cmdr, msg = json.loads(line)
self.add_message(cmdr, msg)
break
except FileNotFoundError:
pass