From 47fcb27a09d0a49fad31d23b76284fdb76acf094 Mon Sep 17 00:00:00 2001 From: Germano Guerrini Date: Thu, 11 Apr 2024 15:17:26 +0200 Subject: [PATCH] Fixed missing exception case that could lead to empty files --- hda/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hda/api.py b/hda/api.py index f9b1b05..5567d37 100644 --- a/hda/api.py +++ b/hda/api.py @@ -767,7 +767,7 @@ def stream(self, download_id, size, download_dir): total += len(chunk) pbar.update(len(chunk)) - except requests.exceptions.ConnectionError as e: + except requests.exceptions.RequestException as e: logger.error("Download interrupted: %s" % (e,)) finally: r.close()