preserve downloadTaskOutput return type

This commit is contained in:
Mike McLean 2019-02-27 15:44:00 -05:00
parent 4222b097c1
commit e0ba3d148d
2 changed files with 4 additions and 3 deletions

View file

@ -9222,7 +9222,10 @@ class RootExports(object):
elif offset != None and offset < 0:
f.seek(offset, 2)
contents = f.read(size)
return base64.encodestring(contents)
if six.PY2:
return base64.encodestring(contents)
else:
return base64.encodestring(contents).decode()
listTaskOutput = staticmethod(list_task_output)

View file

@ -2827,8 +2827,6 @@ class ClientSession(object):
if volume and volume != 'DEFAULT':
dlopts['volume'] = volume
result = self.callMethod('downloadTaskOutput', taskID, fileName, **dlopts)
# py3 doesn't return encodable string
result = str(result)
return base64.decodestring(result.encode('ascii'))