aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/exception.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2020-08-15 17:48:11 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2020-08-15 17:48:11 -0400
commit7cf59dc17c3607e096292462ed15d391be4e3dfd (patch)
tree50d2750e958f43271dc6cc5310211cf8f8bbd9d0 /gallery_dl/exception.py
parentba039cfb2e1ba2522ee0a0fa2a84a1a6579e4877 (diff)
New upstream version 1.14.4.upstream/1.14.4
Diffstat (limited to 'gallery_dl/exception.py')
-rw-r--r--gallery_dl/exception.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/gallery_dl/exception.py b/gallery_dl/exception.py
index 783e2b2..f553d41 100644
--- a/gallery_dl/exception.py
+++ b/gallery_dl/exception.py
@@ -51,6 +51,11 @@ class HttpError(ExtractionError):
default = "HTTP request failed"
code = 4
+ def __init__(self, message, response=None):
+ ExtractionError.__init__(self, message)
+ self.response = response
+ self.status = response.status_code if response else 0
+
class NotFoundError(ExtractionError):
"""Requested resource (gallery/image) could not be found"""