diff options
author | Shadab Zafar <dufferzafar0@gmail.com> | 2016-07-09 12:57:55 +0530 |
---|---|---|
committer | Shadab Zafar <dufferzafar0@gmail.com> | 2016-07-09 13:28:20 +0530 |
commit | 83a1cc5a9a62dbe22bd9e87f496928ae1664da2b (patch) | |
tree | fbf2e8a1e5165cfb84d6118a8b0e30650ca15f8f /netlib | |
parent | bd58230178efac789fabc4e4aa81ae6ad5c4b2b4 (diff) | |
download | mitmproxy-83a1cc5a9a62dbe22bd9e87f496928ae1664da2b.tar.gz mitmproxy-83a1cc5a9a62dbe22bd9e87f496928ae1664da2b.tar.bz2 mitmproxy-83a1cc5a9a62dbe22bd9e87f496928ae1664da2b.zip |
Make escape_control_characters handle strings on Py2
Diffstat (limited to 'netlib')
-rw-r--r-- | netlib/strutils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/netlib/strutils.py b/netlib/strutils.py index a51df886..32e77927 100644 --- a/netlib/strutils.py +++ b/netlib/strutils.py @@ -57,8 +57,8 @@ def escape_control_characters(text, keep_spacing=True): Args: keep_spacing: If True, tabs and newlines will not be replaced. """ - # type: (six.text_type) -> six.text_type - if not isinstance(text, six.text_type): + # type: (six.string_types) -> six.text_type + if not isinstance(text, six.string_types): raise ValueError("text type must be unicode but is {}".format(type(text).__name__)) trans = _control_char_trans_newline if keep_spacing else _control_char_trans |