inline log method

This commit is contained in:
Thomas Kriechbaumer 2015-07-16 22:57:45 +02:00
parent 032f8b2985
commit caaac5cd5a

View File

@ -314,11 +314,6 @@ class Pathoc(tcp.TCPClient):
if self.timeout:
self.settimeout(self.timeout)
def _resp_summary(self, resp):
return "<< %s %s: %s bytes" % (
resp.status_code, utils.xrepr(resp.msg), len(resp.content)
)
def stop(self):
if self.ws_framereader:
self.ws_framereader.terminate.put(None)
@ -421,7 +416,9 @@ class Pathoc(tcp.TCPClient):
raise
finally:
if resp:
lg(self._resp_summary(resp))
lg("<< %s %s: %s bytes" % (
resp.status_code, utils.xrepr(resp.msg), len(resp.content)
))
if resp.status_code in self.ignorecodes:
lg.suppress()
return resp