Fixed batch errors
This commit is contained in:
parent
f95d72c37c
commit
9af88bf206
@ -22,10 +22,13 @@ class BatchResponse(BaseResponse):
|
||||
|
||||
@property
|
||||
def json(self):
|
||||
if self.body is None:
|
||||
if self.body is None or self.body == '':
|
||||
self._json = {}
|
||||
elif not hasattr(self, '_json'):
|
||||
self._json = json.loads(self.body)
|
||||
try:
|
||||
self._json = json.loads(self.body)
|
||||
except json.JSONDecodeError:
|
||||
print()
|
||||
return self._json
|
||||
|
||||
def _get_param(self, param_name, if_none=None):
|
||||
|
@ -6,6 +6,6 @@ url_bases = [
|
||||
]
|
||||
|
||||
url_paths = {
|
||||
'{0}/v1/createcomputeenvironment': BatchResponse.dispatch,
|
||||
'{0}/v1/describecomputeenvironments': BatchResponse.dispatch,
|
||||
'{0}/v1/createcomputeenvironment$': BatchResponse.dispatch,
|
||||
'{0}/v1/describecomputeenvironments$': BatchResponse.dispatch,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user