From e51ee6b1328ab12f0e415eacb731ff5b723ce720 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sat, 24 Feb 2024 00:04:24 +0100 Subject: [PATCH] fix HttpError.status value 'response' with error status code evaluates to False --- gallery_dl/exception.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gallery_dl/exception.py b/gallery_dl/exception.py index ee183fcc..08dcfdce 100644 --- a/gallery_dl/exception.py +++ b/gallery_dl/exception.py @@ -57,7 +57,7 @@ class HttpError(ExtractionError): def __init__(self, message, response=None): ExtractionError.__init__(self, message) self.response = response - self.status = response.status_code if response else 0 + self.status = 0 if response is None else response.status_code class NotFoundError(ExtractionError):