1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2025-01-31 11:41:35 +01:00

fix HttpError.status value

'response' with error status code evaluates to False
This commit is contained in:
Mike Fährmann 2024-02-24 00:04:24 +01:00
parent b4c46de4b8
commit e51ee6b132
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

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