diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2016-06-02 12:37:24 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2016-06-02 12:37:24 +1200 |
commit | 3d9dbd6a4940cc7fe6f65cbb257aaeacd1eab1ee (patch) | |
tree | 04f24b6cbd21ed6140f588b56610fb0fc67ca493 /pathod/pathoc.py | |
parent | cccdc9842648518de7ee48ce461801954fc334c8 (diff) | |
download | mitmproxy-3d9dbd6a4940cc7fe6f65cbb257aaeacd1eab1ee.tar.gz mitmproxy-3d9dbd6a4940cc7fe6f65cbb257aaeacd1eab1ee.tar.bz2 mitmproxy-3d9dbd6a4940cc7fe6f65cbb257aaeacd1eab1ee.zip |
xrepr is used exactly once. move to pathoc.py.
Diffstat (limited to 'pathod/pathoc.py')
-rw-r--r-- | pathod/pathoc.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pathod/pathoc.py b/pathod/pathoc.py index 910387b6..ebbd952a 100644 --- a/pathod/pathoc.py +++ b/pathod/pathoc.py @@ -26,6 +26,10 @@ from netlib.tutils import treq logging.getLogger("hpack").setLevel(logging.WARNING) +def xrepr(s): + return repr(s)[1:-1] + + class PathocError(Exception): pass @@ -423,7 +427,7 @@ class Pathoc(tcp.TCPClient): finally: if resp: lg("<< %s %s: %s bytes" % ( - resp.status_code, utils.xrepr(resp.reason), len(resp.content) + resp.status_code, xrepr(resp.reason), len(resp.content) )) if resp.status_code in self.ignorecodes: lg.suppress() |