Skip to content

Commit

Permalink
Merge pull request wangshub#50 from privatez/fix-python3-json-api
Browse files Browse the repository at this point in the history
Fix: json.loads 无法在3.6以下版本运行
  • Loading branch information
神奇的战士-王松 authored Jun 7, 2018
2 parents 1207e1f + 6920dbe commit a936dd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/apiutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def invoke(self, params):
req = urllib.request.Request(self.url, self.url_data)
try:
rsp = urllib.request.urlopen(req)
str_rsp = rsp.read()
str_rsp = rsp.read().decode('utf-8')
dict_rsp = json.loads(str_rsp)
return dict_rsp
except Exception as e:
Expand Down

0 comments on commit a936dd4

Please sign in to comment.