Skip to content

Commit

Permalink
update encode
Browse files Browse the repository at this point in the history
  • Loading branch information
liangliangyy committed Sep 3, 2017
1 parent 09f3e50 commit 1af0823
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion servermanager/Api/commonapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ def UserAgent(self, url):

def getdata(self, content):
requrl = self.__build_req_url(content)
res = self.UserAgent(requrl)
res = self.UserAgent(requrl).decode('utf-8')
logger.info(res)
try:
jsons = json.loads(res, encoding='utf-8')
if str(jsons["code"]) == '100000':
Expand Down

0 comments on commit 1af0823

Please sign in to comment.