From caaac5cd5a48d2bd1e50f0ff88c9d73a20ec9aa6 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Thu, 16 Jul 2015 22:57:45 +0200 Subject: [PATCH] inline log method --- libpathod/pathoc.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/libpathod/pathoc.py b/libpathod/pathoc.py index ba15e630d..b7802daae 100644 --- a/libpathod/pathoc.py +++ b/libpathod/pathoc.py @@ -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