message arg for HTTPWrongContentTypeException/HTTPParsingException
This commit is contained in:
parent
890c893ddf
commit
f9eb017466
1 changed files with 5 additions and 5 deletions
|
@ -18,12 +18,12 @@ class HTTPTimeoutException(HTTPException):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
Exception.__init__(self, "HTTP request timed out")
|
Exception.__init__(self, "HTTP request timed out")
|
||||||
class HTTPParsingException(HTTPException):
|
class HTTPParsingException(HTTPException):
|
||||||
def __init__(self):
|
def __init__(self, message: str=None):
|
||||||
Exception.__init__(self, "HTTP parsing failed")
|
Exception.__init__(self, message or "HTTP parsing failed")
|
||||||
pass
|
|
||||||
class HTTPWrongContentTypeException(HTTPException):
|
class HTTPWrongContentTypeException(HTTPException):
|
||||||
def __init__(self):
|
def __init__(self, message: str=None):
|
||||||
Exception.__init__(self, "HTTP request gave wrong content type")
|
Exception.__init__(self,
|
||||||
|
message or "HTTP request gave wrong content type")
|
||||||
|
|
||||||
def throw_timeout():
|
def throw_timeout():
|
||||||
raise HTTPTimeoutException()
|
raise HTTPTimeoutException()
|
||||||
|
|
Loading…
Reference in a new issue