From 3d9dbd6a4940cc7fe6f65cbb257aaeacd1eab1ee Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 2 Jun 2016 12:37:24 +1200 Subject: [PATCH] xrepr is used exactly once. move to pathoc.py. --- pathod/pathoc.py | 6 +++++- pathod/utils.py | 4 ---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pathod/pathoc.py b/pathod/pathoc.py index 910387b65..ebbd952ad 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() diff --git a/pathod/utils.py b/pathod/utils.py index 1b6ef3ef6..96b54ab8e 100644 --- a/pathod/utils.py +++ b/pathod/utils.py @@ -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.