From feed5735d441c41446af19731d77af80e8109a74 Mon Sep 17 00:00:00 2001 From: derrod Date: Sat, 18 Apr 2020 02:17:46 +0200 Subject: [PATCH] [downloader] Remove resume file after installation finishes --- legendary/downloader/manager.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/legendary/downloader/manager.py b/legendary/downloader/manager.py index fdac54b..6e93c29 100644 --- a/legendary/downloader/manager.py +++ b/legendary/downloader/manager.py @@ -597,6 +597,12 @@ class DLManager(Process): if t.is_alive(): self.log.warning(f'Thread did not terminate! {repr(t)}') + # clean up resume file + try: + os.remove(self.resume_file) + except OSError as e: + self.log.warning(f'Failed to remove resume file: {e!r}') + # close up shared memory self.shared_memory.close() self.shared_memory.unlink()