diff options
| author | Shadab Zafar <dufferzafar0@gmail.com> | 2016-05-08 16:20:27 +0530 |
|---|---|---|
| committer | Shadab Zafar <dufferzafar0@gmail.com> | 2016-05-26 23:07:37 +0530 |
| commit | 22e4bc1938b74b0d0bfda7cab41b54070bcd7fb9 (patch) | |
| tree | b917986a9eda777a0d1a9c5a1ec409112b184423 /pathod | |
| parent | e5cebb81fb46f21ba77cbc2a1b3a58aad5e77a66 (diff) | |
| download | mitmproxy-22e4bc1938b74b0d0bfda7cab41b54070bcd7fb9.tar.gz mitmproxy-22e4bc1938b74b0d0bfda7cab41b54070bcd7fb9.tar.bz2 mitmproxy-22e4bc1938b74b0d0bfda7cab41b54070bcd7fb9.zip | |
Py3: Handle bytes case in inner_repr
Diffstat (limited to 'pathod')
| -rw-r--r-- | pathod/utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pathod/utils.py b/pathod/utils.py index 2f9de83d..b14535ca 100644 --- a/pathod/utils.py +++ b/pathod/utils.py @@ -60,7 +60,8 @@ def inner_repr(s): Returns the inner portion of a string or unicode repr (i.e. without the quotes) """ - if six.PY2 and isinstance(s, unicode): + if (six.PY2 and isinstance(s, unicode)) or \ + (six.PY3 and isinstance(s, bytes)): return repr(s)[2:-1] else: return repr(s)[1:-1] |
