replace json.loads(resp.content) by simpler resp.json() (#8240)
This commit is contained in:
parent
cca2f6d621
commit
f3fddf5735
|
@ -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 []
|
||||
|
|
Loading…
Reference in New Issue