self._desc = desc
def _log(self, dflag, msg, **kwargs):
- self.cl.log(dflag, '%s: %s' % (self._desc, msg), idof=self._req, **kwargs)
+ self._cl.log(dflag, '%s: %s' % (self._desc, msg), idof=self._req, **kwargs)
def connectionMade(self):
self._log(DBG.HTTP_CTRL, 'connectionMade')
try:
self._log(DBG.HTTP, 'ResponseDone')
self._ssd.flush()
- self.cl.req_fin(self._req)
+ self._cl.req_fin(self._req)
except Exception as e:
self._handleexception()
if not self._success_reported:
def _latefailure(self, reason):
self._log(DBG.HTTP_CTRL, '_latefailure ' + str(reason))
- self.cl.req_err(self._req, reason)
+ self._cl.req_err(self._req, reason)
-class ErrorResponseConsumer(twisted.internet.protocol.Protocol):
+class ErrorResponseConsumer(GeneralResponseConsumer):
def __init__(self, cl, req, resp):
super().__init__(cl, req, 'ERROR-RC')
self._resp = resp
mbody = repr(self._m)
if not reason.check(twisted.web.client.ResponseDone):
mbody += ' || ' + str(reason)
- self.cl.req_err(self._req,
+ self._cl.req_err(self._req,
"FAILED %d %s | %s"
% (self._resp.code, self._phrase, mbody))