aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2015-07-16 22:57:45 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2015-07-22 15:30:33 +0200
commitcaaac5cd5a48d2bd1e50f0ff88c9d73a20ec9aa6 (patch)
treefa6e85cee10f8708b844234dabc8f43c2ea63d96
parent032f8b2985a7c5f89d2dde0992e4f356bf58fcaa (diff)
downloadmitmproxy-caaac5cd5a48d2bd1e50f0ff88c9d73a20ec9aa6.tar.gz
mitmproxy-caaac5cd5a48d2bd1e50f0ff88c9d73a20ec9aa6.tar.bz2
mitmproxy-caaac5cd5a48d2bd1e50f0ff88c9d73a20ec9aa6.zip
inline log method
-rw-r--r--libpathod/pathoc.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/libpathod/pathoc.py b/libpathod/pathoc.py
index ba15e630..b7802daa 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