aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorGravatar jesopo2019-06-27 18:28:08 +0100
committerGravatar jesopo2019-06-27 18:28:08 +0100
commit97810db8df786143fd500fc68483d214a336f7f0 (patch)
treed2caf0590dfa1a2b436e8213185ee26a880ac0e0 /src/utils
parentseems i completely forgot try/except syntax (diff)
signature
Give descriptions to utils.http.HTTPException subclasses
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/http.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/utils/http.py b/src/utils/http.py
index 5dac7e90..ac46ce6b 100644
--- a/src/utils/http.py
+++ b/src/utils/http.py
@@ -15,11 +15,15 @@ SOUP_CONTENT_TYPES = ["text/html", "text/xml", "application/xml"]
class HTTPException(Exception):
pass
class HTTPTimeoutException(HTTPException):
- pass
+ def __init__(self):
+ Exception.__init__(self, "HTTP request timed out")
class HTTPParsingException(HTTPException):
+ def __init__(self):
+ Exception.__init__(self, "HTTP parsing failed")
pass
class HTTPWrongContentTypeException(HTTPException):
- pass
+ def __init__(self):
+ Exception.__init__(self, "HTTP request gave wrong content type")
def throw_timeout():
raise HTTPTimeoutException()