Skip to content

Commit

Permalink
Python 2.6 string decode fix
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Jun 1, 2016
1 parent 80e0ed9 commit de5bea9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wechatpy/client/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def _request(self, method, url_or_endpoint, **kwargs):
def _decode_result(self, res):
res.encoding = 'utf-8'
try:
result = json.loads(res.content.decode('utf-8', errors='ignore'))
result = json.loads(res.content.decode('utf-8', 'ignore'))
except (TypeError, ValueError):
# Return origin response object if we can not decode it as JSON
return res
Expand Down

0 comments on commit de5bea9

Please sign in to comment.