Skip to content

Commit 525fabe

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Drop direct dependency on simplejson"
2 parents 6dbf7af + cf6dd62 commit 525fabe

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

openstackclient/api/api.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@
1212
#
1313

1414
"""Base API Library"""
15-
1615
from keystoneauth1 import exceptions as ks_exceptions
1716
from keystoneauth1 import session as ks_session
1817
from osc_lib import exceptions
19-
import simplejson as json
18+
import requests
2019

2120
from openstackclient.i18n import _
2221

@@ -118,7 +117,7 @@ def create(self, url, session=None, method=None, **params):
118117
# Should this move into _requests()?
119118
try:
120119
return ret.json()
121-
except json.JSONDecodeError:
120+
except requests.JSONDecodeError:
122121
return ret
123122

124123
def delete(self, url, session=None, **params):
@@ -169,7 +168,7 @@ def list(self, path, session=None, body=None, detailed=False, **params):
169168
)
170169
try:
171170
return ret.json()
172-
except json.JSONDecodeError:
171+
except requests.JSONDecodeError:
173172
return ret
174173

175174
# Layered actions built on top of the basic action methods do not

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ oslo.i18n>=3.15.3 # Apache-2.0
1313
python-keystoneclient>=3.22.0 # Apache-2.0
1414
python-novaclient>=18.1.0 # Apache-2.0
1515
python-cinderclient>=3.3.0 # Apache-2.0
16+
requests>=2.14.2 # Apache-2.0
1617
stevedore>=2.0.1 # Apache-2.0

0 commit comments

Comments
 (0)