s/unicode/not bytes/
This commit is contained in:
parent
051e591c25
commit
2a312940b3
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue