replace json.loads(resp.content) by simpler resp.json() (#8240)

This commit is contained in:
Benjamin Dauvergne 2016-07-28 17:10:49 +02:00
parent cca2f6d621
commit f3fddf5735
1 changed files with 1 additions and 2 deletions

View File

@ -1,7 +1,6 @@
import urlparse
import requests
import logging
import json
from django.core.urlresolvers import reverse
from django.db import models
@ -50,7 +49,7 @@ class MontpellierSig(BaseResource):
resp.status_code, resp.content)
return []
try:
return json.loads(resp.content)
return resp.json()
except Exception, e:
logger.warning('error occured while trying to read json data from %r: %r', endpoint, e)
return []