From 2a312940b3bc74b3cc0e436bc60f2d162cc3dd31 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 30 Aug 2016 21:18:57 +0200 Subject: [PATCH] s/unicode/not bytes/ --- pandora_client/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_client/__init__.py b/pandora_client/__init__.py index c8c5ef0..4293af6 100755 --- a/pandora_client/__init__.py +++ b/pandora_client/__init__.py @@ -93,7 +93,7 @@ def parse_path(client, path, prefix=None): return: return None if file will not be used, dict with parsed item information otherwise ''' - if not isinstance(path, unicode): + if isinstance(path, bytes): path = path.decode('utf-8') path = path.replace(os.sep, '/') parts = path.split('/') @@ -1075,7 +1075,7 @@ class API(ox.API): resume_offset = 0 chunk = f.read(CHUNK_SIZE) fname = os.path.basename(filename) - if isinstance(fname, unicode): + if not isinstance(fname, bytes): fname = fname.encode('utf-8') while chunk: elapsed = time.mktime(time.localtime()) - start