diff --git a/appPublic/dictObject.py b/appPublic/dictObject.py index 657fbeb..ba6f806 100755 --- a/appPublic/dictObject.py +++ b/appPublic/dictObject.py @@ -39,9 +39,12 @@ class DictObject: def __setitem__(self,name,value): self.kwargs[name] = value - def __delattr__(self,name): + def __delitem__(self,name): self.kwargs.pop(name) + def get(self,name,dv=None): + return self.kwargs.get(name,dv) + def copy(self): return self.kwargs.copy() diff --git a/appPublic/http_client.py b/appPublic/http_client.py index 2d14532..0ff5fbc 100644 --- a/appPublic/http_client.py +++ b/appPublic/http_client.py @@ -20,9 +20,10 @@ class HTTPError(Exception): hostsessions = {} -class HttpClient: +class Http_Client: def __init__(self): self.s = requests.Session() + self.s.verify = False def url2domain(self,url): parts = url.split('/')[:3] @@ -64,7 +65,7 @@ class HttpClient: print('Error', url, method, params, resp.status_code, type(resp.status_code)) - raise HTTPError(resp.status_code) + raise HTTPError(resp.status_code,url) return resp def webcall(self,url,method="GET",