mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-01-12 22:48:54 +08:00
xrepr is used exactly once. move to pathoc.py.
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -28,10 +28,6 @@ def parse_anchor_spec(s):
|
||||
return tuple(s.split("=", 1))
|
||||
|
||||
|
||||
def xrepr(s):
|
||||
return repr(s)[1:-1]
|
||||
|
||||
|
||||
def escape_unprintables(s):
|
||||
"""
|
||||
Like inner_repr, but preserves line breaks.
|
||||
|
||||
Reference in New Issue
Block a user