Fix encoding

This commit is contained in:
angelblue05 2017-06-24 22:04:05 -05:00
parent 4a3be4d628
commit 03e8b2ec86

View file

@ -178,13 +178,13 @@ class DownloadUtils(object):
def get_header(self, server_id=None, authenticate=True): def get_header(self, server_id=None, authenticate=True):
device_name = self.client_info.get_device_name().encode('utf-8') device_name = self.client_info.get_device_name().encode('utf-8')
device_id = self.client_info.get_device_id() device_id = self.client_info.get_device_id().encode('utf-8')
version = self.client_info.get_version() version = self.client_info.get_version().encode('utf-8')
if authenticate: if authenticate:
user = self._get_session_info(server_id) user = self._get_session_info(server_id)
user_id = user['UserId'] user_id = user['UserId'].encode('utf-8')
token = user['Token'] token = user['Token']
auth = ( auth = (
@ -209,6 +209,7 @@ class DownloadUtils(object):
}) })
return header return header
def downloadUrl(self, url, postBody=None, action_type="GET", parameters=None, def downloadUrl(self, url, postBody=None, action_type="GET", parameters=None,
authenticate=True, server_id=None): authenticate=True, server_id=None):