Merge "Drop direct dependency on simplejson"
This commit is contained in:
commit
525fabe051
@ -12,11 +12,10 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
"""Base API Library"""
|
"""Base API Library"""
|
||||||
|
|
||||||
from keystoneauth1 import exceptions as ks_exceptions
|
from keystoneauth1 import exceptions as ks_exceptions
|
||||||
from keystoneauth1 import session as ks_session
|
from keystoneauth1 import session as ks_session
|
||||||
from osc_lib import exceptions
|
from osc_lib import exceptions
|
||||||
import simplejson as json
|
import requests
|
||||||
|
|
||||||
from openstackclient.i18n import _
|
from openstackclient.i18n import _
|
||||||
|
|
||||||
@ -118,7 +117,7 @@ class BaseAPI(KeystoneSession):
|
|||||||
# Should this move into _requests()?
|
# Should this move into _requests()?
|
||||||
try:
|
try:
|
||||||
return ret.json()
|
return ret.json()
|
||||||
except json.JSONDecodeError:
|
except requests.JSONDecodeError:
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
def delete(self, url, session=None, **params):
|
def delete(self, url, session=None, **params):
|
||||||
@ -169,7 +168,7 @@ class BaseAPI(KeystoneSession):
|
|||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
return ret.json()
|
return ret.json()
|
||||||
except json.JSONDecodeError:
|
except requests.JSONDecodeError:
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
# Layered actions built on top of the basic action methods do not
|
# Layered actions built on top of the basic action methods do not
|
||||||
|
@ -13,4 +13,5 @@ oslo.i18n>=3.15.3 # Apache-2.0
|
|||||||
python-keystoneclient>=3.22.0 # Apache-2.0
|
python-keystoneclient>=3.22.0 # Apache-2.0
|
||||||
python-novaclient>=18.1.0 # Apache-2.0
|
python-novaclient>=18.1.0 # Apache-2.0
|
||||||
python-cinderclient>=3.3.0 # Apache-2.0
|
python-cinderclient>=3.3.0 # Apache-2.0
|
||||||
|
requests>=2.14.2 # Apache-2.0
|
||||||
stevedore>=2.0.1 # Apache-2.0
|
stevedore>=2.0.1 # Apache-2.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user