s/unicode/not bytes/

This commit is contained in:
j 2016-08-30 21:18:57 +02:00
parent 051e591c25
commit 2a312940b3

View file

@ -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