bugfix
This commit is contained in:
parent
91affcd3e4
commit
0682ebb55e
@ -100,7 +100,7 @@ class ExecFile(object) :
|
||||
try :
|
||||
exec(buf,globals(),self.__object.__dict__)
|
||||
except Exception as e:
|
||||
print("ExecFile()",e)
|
||||
print("ExecFile()",e,self.__file)
|
||||
return (False,e)
|
||||
return (True,'')
|
||||
|
||||
|
@ -24,6 +24,13 @@ class Http_Client:
|
||||
def __init__(self):
|
||||
self.s = requests.Session()
|
||||
self.s.verify = False
|
||||
self.s.hooks['response'].append(self.response_handler)
|
||||
|
||||
def prepped_handler(self, prepped):
|
||||
pass
|
||||
|
||||
def response_handler(self, resp, *args, **kw):
|
||||
return resp
|
||||
|
||||
def url2domain(self,url):
|
||||
parts = url.split('/')[:3]
|
||||
@ -47,6 +54,7 @@ class Http_Client:
|
||||
req = requests.Request(method,url,
|
||||
data=params,files=files,headers=headers)
|
||||
prepped = self.s.prepare_request(req)
|
||||
self.prepped_handler(prepped)
|
||||
resp = self.s.send(prepped)
|
||||
if resp.status_code == 200:
|
||||
h = resp.headers.get('Set-Cookie',None)
|
||||
|
@ -89,7 +89,7 @@ class KeyChain(object):
|
||||
i = self.get_indicator(ts)
|
||||
if i + self.threshold > ts:
|
||||
return True
|
||||
return FalseTrue
|
||||
return False
|
||||
|
||||
def is_near_top(self, indicator=None):
|
||||
ts = self.get_timestamp()
|
||||
|
Loading…
Reference in New Issue
Block a user