From 4b19a46148d8c739ae3e558290ce37a30a28f292 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 6 Jun 2019 18:49:24 +0200 Subject: Exit manga download on failure --- plugins/manganelo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/manganelo.py') diff --git a/plugins/manganelo.py b/plugins/manganelo.py index 1526e6f..25114fa 100755 --- a/plugins/manganelo.py +++ b/plugins/manganelo.py @@ -73,7 +73,8 @@ def download_chapter(url, download_dir): image_name = str(img_number) + ext image_path = os.path.join(download_dir, image_name) print("Downloading {} to {}".format(image_source, image_path)) - download_file(image_source, image_path) + if not download_file(image_source, image_path): + exit(1) img_number += 1 with open(os.path.join(download_dir, "finished"), "w") as file: -- cgit v1.2.3