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:
parent
c524dc5769
commit
38c2f19474
@ -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."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user