From a10afe270ff7bc2721ed100c9215e4b02053f9ca Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 3 Jun 2020 16:27:25 +0800 Subject: [PATCH] bugfix --- http_client.py => appPublic/http_client.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) rename http_client.py => appPublic/http_client.py (95%) diff --git a/http_client.py b/appPublic/http_client.py similarity index 95% rename from http_client.py rename to appPublic/http_client.py index 0145b1c..2d14532 100644 --- a/http_client.py +++ b/appPublic/http_client.py @@ -7,15 +7,16 @@ class InsufficientPrivilege(Exception): pass class HTTPError(Exception): - def __init__(self,resp_code): + def __init__(self,resp_code,url=None): self.resp_code = resp_code + self.url = url Exception.__init__(self) def __expr__(self): - return f'Exception:return code={self.resp_code}' + return f'{self.url}:{self.resp_code}' def __str__(self): - return f'Exception:return code={self.resp_code}' + return f'{self.url}:{self.resp_code}' hostsessions = {}