exit_cleanup: Use aria2.remove_all method instead of loop

Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
This commit is contained in:
lzzy12 2019-10-11 23:28:46 +05:30
parent fda8785c64
commit b5c3989451

View File

@ -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: