From 1af0823d652088d25b67917e70fb94af6dc30ec4 Mon Sep 17 00:00:00 2001 From: liangliang Date: Sun, 3 Sep 2017 16:20:41 +0800 Subject: [PATCH] update encode --- servermanager/Api/commonapi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/servermanager/Api/commonapi.py b/servermanager/Api/commonapi.py index 8c392d58..560352ba 100644 --- a/servermanager/Api/commonapi.py +++ b/servermanager/Api/commonapi.py @@ -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':