mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-2652: requests module differs on Python 2.6
On 2.6 response.json returns the JSOn in the response while on 2.7 response.json() is a method. Since Marvin installs on both platforms fixing the error appropriately Signed-off-by: Prasanna Santhanam <tsp@apache.org>
This commit is contained in:
parent
d8f5f2ea10
commit
ed2ce27371
|
|
@ -219,7 +219,10 @@ class cloudConnection(object):
|
|||
cmdname, self.auth, payload=payload, method=method)
|
||||
self.logging.debug("Request: %s Response: %s" %
|
||||
(response.url, response.text))
|
||||
response = jsonHelper.getResultObj(response.json(), response_type)
|
||||
try:
|
||||
response = jsonHelper.getResultObj(response.json(), response_type)
|
||||
except TypeError:
|
||||
response = jsonHelper.getResultObj(response.json, response_type)
|
||||
|
||||
if isAsync == "false":
|
||||
return response
|
||||
|
|
|
|||
Loading…
Reference in New Issue