exit_cleanup: Use aria2.remove_all method instead of loop
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
This commit is contained in:
parent
fda8785c64
commit
b5c3989451
|
|
@ -22,8 +22,7 @@ def start_cleanup():
|
|||
def exit_clean_up(signal, frame):
|
||||
try:
|
||||
LOGGER.info("Please wait, while we clean up the downloads and stop running downloads")
|
||||
for download in aria2.get_downloads():
|
||||
download.remove()
|
||||
aria2.remove_all(True)
|
||||
shutil.rmtree(DOWNLOAD_DIR)
|
||||
sys.exit(0)
|
||||
except KeyboardInterrupt:
|
||||
|
|
|
|||
Loading…
Reference in New Issue