mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 17:55:27 +00:00
[downloader] Check if resume file actually exists before trying to delete it
This commit is contained in:
parent
0b6824ba58
commit
be8e0169d4
|
@ -602,10 +602,11 @@ class DLManager(Process):
|
||||||
self.log.warning(f'Thread did not terminate! {repr(t)}')
|
self.log.warning(f'Thread did not terminate! {repr(t)}')
|
||||||
|
|
||||||
# clean up resume file
|
# clean up resume file
|
||||||
try:
|
if self.resume_file:
|
||||||
os.remove(self.resume_file)
|
try:
|
||||||
except OSError as e:
|
os.remove(self.resume_file)
|
||||||
self.log.warning(f'Failed to remove resume file: {e!r}')
|
except OSError as e:
|
||||||
|
self.log.warning(f'Failed to remove resume file: {e!r}')
|
||||||
|
|
||||||
# close up shared memory
|
# close up shared memory
|
||||||
self.shared_memory.close()
|
self.shared_memory.close()
|
||||||
|
|
Loading…
Reference in a new issue