1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-22 20:00:29 +03:00

eddn: Suppress "converted file" for legacy if no file

This was a total brainfart, `finally:` is never what was wanted here.
So, just `return` if `FileNotFoundError`.
This commit is contained in:
Athanasius 2022-12-05 16:40:44 +00:00
parent c524dc5769
commit 38c2f19474
No known key found for this signature in database
GPG Key ID: 772697E181BB2767

View File

@ -251,15 +251,14 @@ class EDDNSender:
self.add_message(cmdr, msg)
except FileNotFoundError:
pass
return
finally:
# Best effort at removing the file/contents
# NB: The legacy code assumed it could write to the file.
logger.info("Conversion` to `eddn_queue-v1.db` complete, removing `replay.jsonl`")
replay_file = open(filename, 'w') # Will truncate
replay_file.close()
os.unlink(filename)
# Best effort at removing the file/contents
# NB: The legacy code assumed it could write to the file.
logger.info("Conversion` to `eddn_queue-v1.db` complete, removing `replay.jsonl`")
replay_file = open(filename, 'w') # Will truncate
replay_file.close()
os.unlink(filename)
def close(self) -> None:
"""Clean up any resources."""