Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 62279DFEE for ; Sat, 25 May 2013 03:20:40 +0000 (UTC) Received: (qmail 81676 invoked by uid 500); 25 May 2013 03:20:39 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 81094 invoked by uid 500); 25 May 2013 03:20:38 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 80332 invoked by uid 99); 25 May 2013 03:20:36 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 May 2013 03:20:36 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id B392F17083; Sat, 25 May 2013 03:20:34 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sateesh@apache.org To: commits@cloudstack.apache.org Date: Sat, 25 May 2013 03:20:40 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [07/24] git commit: updated refs/heads/vmware-storage-motion to 985435d 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 Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ed2ce273 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ed2ce273 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ed2ce273 Branch: refs/heads/vmware-storage-motion Commit: ed2ce2737133de6277bba0be9b7e10d3faaf887d Parents: d8f5f2e Author: Prasanna Santhanam Authored: Fri May 24 19:21:40 2013 +0530 Committer: Prasanna Santhanam Committed: Fri May 24 19:22:49 2013 +0530 ---------------------------------------------------------------------- tools/marvin/marvin/cloudstackConnection.py | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ed2ce273/tools/marvin/marvin/cloudstackConnection.py ---------------------------------------------------------------------- diff --git a/tools/marvin/marvin/cloudstackConnection.py b/tools/marvin/marvin/cloudstackConnection.py index e3977dc..b092ef0 100644 --- a/tools/marvin/marvin/cloudstackConnection.py +++ b/tools/marvin/marvin/cloudstackConnection.py @@ -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