From f9edffc58e5198d7995c3652acee9116ae9fe7d8 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sun, 24 Jul 2016 20:13:18 -0700 Subject: [PATCH] silence test warnings --- netlib/encoding.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/netlib/encoding.py b/netlib/encoding.py index 29e2a420a..da282194b 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