aboutsummaryrefslogtreecommitdiffstats
path: root/netlib
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-07-24 20:13:18 -0700
committerMaximilian Hils <git@maximilianhils.com>2016-07-24 20:13:18 -0700
commitf9edffc58e5198d7995c3652acee9116ae9fe7d8 (patch)
tree9c7e2d82576c9edfd9824a44a1e1199fb528da8e /netlib
parentc1bd4dabc8a03b17ea55b5e7b4ab444f59b95e2d (diff)
downloadmitmproxy-f9edffc58e5198d7995c3652acee9116ae9fe7d8.tar.gz
mitmproxy-f9edffc58e5198d7995c3652acee9116ae9fe7d8.tar.bz2
mitmproxy-f9edffc58e5198d7995c3652acee9116ae9fe7d8.zip
silence test warnings
Diffstat (limited to 'netlib')
-rw-r--r--netlib/encoding.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/netlib/encoding.py b/netlib/encoding.py
index 29e2a420..da282194 100644
--- a/netlib/encoding.py
+++ b/netlib/encoding.py
@@ -33,6 +33,7 @@ def decode(encoded, encoding, errors='strict'):
"""
global _cache
cached = (
+ isinstance(encoded, bytes) and
_cache.encoded == encoded and
_cache.encoding == encoding and
_cache.errors == errors
@@ -68,6 +69,7 @@ def encode(decoded, encoding, errors='strict'):
"""
global _cache
cached = (
+ isinstance(decoded, bytes) and
_cache.decoded == decoded and
_cache.encoding == encoding and
_cache.errors == errors