aboutsummaryrefslogtreecommitdiffstats
path: root/netlib/strutils.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-07-01 14:10:48 -0700
committerMaximilian Hils <git@maximilianhils.com>2016-07-01 14:10:48 -0700
commit536c7acd13426d42dc863ae8b50e6c3a4cb2e858 (patch)
treee868530aef8353273a3107b57645fd5b02e717b0 /netlib/strutils.py
parente0ed7699ca1258414a99812720f168e14a6ca219 (diff)
downloadmitmproxy-536c7acd13426d42dc863ae8b50e6c3a4cb2e858.tar.gz
mitmproxy-536c7acd13426d42dc863ae8b50e6c3a4cb2e858.tar.bz2
mitmproxy-536c7acd13426d42dc863ae8b50e6c3a4cb2e858.zip
py3++
Diffstat (limited to 'netlib/strutils.py')
-rw-r--r--netlib/strutils.py10
1 files changed, 0 insertions, 10 deletions
diff --git a/netlib/strutils.py b/netlib/strutils.py
index 5ad41c7e..ca6eaa42 100644
--- a/netlib/strutils.py
+++ b/netlib/strutils.py
@@ -1,4 +1,3 @@
-import re
import unicodedata
import codecs
@@ -56,15 +55,6 @@ def clean_bin(s, keep_spacing=True):
)
-def safe_subn(pattern, repl, target, *args, **kwargs):
- """
- There are Unicode conversion problems with re.subn. We try to smooth
- that over by casting the pattern and replacement to strings. We really
- need a better solution that is aware of the actual content ecoding.
- """
- return re.subn(str(pattern), str(repl), target, *args, **kwargs)
-
-
def bytes_to_escaped_str(data):
"""
Take bytes and return a safe string that can be displayed to the user.