diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2016-06-02 12:53:12 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2016-06-02 12:53:12 +1200 |
commit | 31012d782f64727de1d86662139e9ec6618043c5 (patch) | |
tree | 3887c8e11e30a758e82afdabe764a5e5f4f13e8d /pathod/utils.py | |
parent | 3d9dbd6a4940cc7fe6f65cbb257aaeacd1eab1ee (diff) | |
download | mitmproxy-31012d782f64727de1d86662139e9ec6618043c5.tar.gz mitmproxy-31012d782f64727de1d86662139e9ec6618043c5.tar.bz2 mitmproxy-31012d782f64727de1d86662139e9ec6618043c5.zip |
Consolidate some functions to strutils.bytes_to_escaped_str
Diffstat (limited to 'pathod/utils.py')
-rw-r--r-- | pathod/utils.py | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/pathod/utils.py b/pathod/utils.py index 96b54ab8..3276198a 100644 --- a/pathod/utils.py +++ b/pathod/utils.py @@ -2,8 +2,6 @@ import os import sys import netlib.utils -from netlib import strutils - class MemBool(object): @@ -28,18 +26,6 @@ def parse_anchor_spec(s): return tuple(s.split("=", 1)) -def escape_unprintables(s): - """ - Like inner_repr, but preserves line breaks. - """ - s = s.replace(b"\r\n", b"PATHOD_MARKER_RN") - s = s.replace(b"\n", b"PATHOD_MARKER_N") - s = strutils.bytes_to_escaped_str(s) - s = s.replace("PATHOD_MARKER_RN", "\n") - s = s.replace("PATHOD_MARKER_N", "\n") - return s - - data = netlib.utils.Data(__name__) |