def outbound(cl, packet, saddr, daddr):
#print('OUT ', saddr, daddr, repr(packet))
def outbound(cl, packet, saddr, daddr):
#print('OUT ', saddr, daddr, repr(packet))
cl.log(DBG.HTTP_CTRL,
'req_ok %d %s %s' % (resp.code, repr(resp.phrase), str(resp)),
idof=req)
cl.log(DBG.HTTP_CTRL,
'req_ok %d %s %s' % (resp.code, repr(resp.phrase), str(resp)),
idof=req)
- if resp.code == 200:
- rc = ResponseConsumer(cl, req)
- else:
- rc = ErrorResponseConsumer(cl, req, resp)
+ if resp.code == 200:
+ rc = ResponseConsumer(cl, req)
+ else:
+ rc = ErrorResponseConsumer(cl, req, resp)
def req_err(cl, req, err):
# called when the Deferred fails, or (if it completes),
def req_err(cl, req, err):
# called when the Deferred fails, or (if it completes),
raise RuntimeError('[%#x] previously %s' % (id(req), outstanding[req]))
cl.outstanding[req] = err
cl.log_outstanding()
raise RuntimeError('[%#x] previously %s' % (id(req), outstanding[req]))
cl.outstanding[req] = err
cl.log_outstanding()
- sections = process_cfg_client_common(c,ss,cs,ci):
+ sections = cfg_process_client_common(c,ss,cs,ci)
if not sections: continue
def srch(getter,key): return cfg_search(getter,key,sections)
if not sections: continue
def srch(getter,key): return cfg_search(getter,key,sections)
c.http_retry = srch(cfg.getint, 'http_retry')
c.vroutes = srch(cfg.get, 'vroutes')
c.http_retry = srch(cfg.getint, 'http_retry')
c.vroutes = srch(cfg.get, 'vroutes')