bugfix
This commit is contained in:
parent
f92fd0b2f4
commit
a10afe270f
@ -7,15 +7,16 @@ class InsufficientPrivilege(Exception):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
class HTTPError(Exception):
|
class HTTPError(Exception):
|
||||||
def __init__(self,resp_code):
|
def __init__(self,resp_code,url=None):
|
||||||
self.resp_code = resp_code
|
self.resp_code = resp_code
|
||||||
|
self.url = url
|
||||||
Exception.__init__(self)
|
Exception.__init__(self)
|
||||||
|
|
||||||
def __expr__(self):
|
def __expr__(self):
|
||||||
return f'Exception:return code={self.resp_code}'
|
return f'{self.url}:{self.resp_code}'
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f'Exception:return code={self.resp_code}'
|
return f'{self.url}:{self.resp_code}'
|
||||||
|
|
||||||
hostsessions = {}
|
hostsessions = {}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user