Force encoding of text retrieval functions to use utf-8.

Closes #207
This commit is contained in:
Rapptz
2016-05-10 19:51:59 -04:00
parent 1e175f2ab3
commit 0c8d5ee863
3 changed files with 19 additions and 19 deletions

View File

@ -120,7 +120,7 @@ def get_gateway(token, *, loop=None):
if resp.status != 200:
yield from resp.release()
raise GatewayNotFound()
data = yield from resp.json()
data = yield from resp.json(encoding='utf-8')
return data.get('url')
class DiscordWebSocket(websockets.client.WebSocketClientProtocol):