From 746aef474afebf4cfe5c15d1882437f5355c822c Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Thu, 26 Jul 2018 14:35:44 -0400 Subject: [PATCH] hash.py dropping py2 backwards compat --- torba/hash.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/torba/hash.py b/torba/hash.py index d8ab42bb6..af1f74897 100644 --- a/torba/hash.py +++ b/torba/hash.py @@ -182,13 +182,13 @@ class Base58(object): @classmethod def decode(cls, txt): """ Decodes txt into a big-endian bytearray. """ - if six.PY2 and isinstance(txt, buffer): + if isinstance(txt, memoryview): txt = str(txt) - if isinstance(txt, six.binary_type): + if isinstance(txt, bytes): txt = txt.decode() - if not isinstance(txt, six.text_type): + if not isinstance(txt, str): raise TypeError('a string is required') if not txt: