Replace JSONDecodeError by ValueError (Python 3.4 compatibility)

Fix #847
This commit is contained in:
Julien Duponchelle
2016-12-21 09:45:24 +01:00
parent 8c61ef18ba
commit e53db1ed81
4 changed files with 4 additions and 4 deletions

View File

@ -227,7 +227,7 @@ async def main(loop):
try:
j = await error.response.json()
die("%s %s invalid status %d:\n%s", error.method, error.path, error.response.status, json.dumps(j, indent=4))
except (json.decoder.JSONDecodeError, aiohttp.errors.ServerDisconnectedError):
except (ValueError, aiohttp.errors.ServerDisconnectedError):
die("%s %s invalid status %d", error.method, error.path, error.response.status)