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 0493211FEB for ; Tue, 19 Aug 2014 12:36:56 +0000 (UTC) Received: (qmail 61091 invoked by uid 500); 19 Aug 2014 12:36:55 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 60933 invoked by uid 500); 19 Aug 2014 12:36:55 -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 60782 invoked by uid 99); 19 Aug 2014 12:36:55 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Aug 2014 12:36:55 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 3F29D93DD2E; Tue, 19 Aug 2014 12:36:55 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bhaisaab@apache.org To: commits@cloudstack.apache.org Date: Tue, 19 Aug 2014 12:36:57 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [3/5] git commit: requester: catch and print json decoding errors requester: catch and print json decoding errors Signed-off-by: Rohit Yadav Project: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/commit/a49aab7a Tree: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/tree/a49aab7a Diff: http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/diff/a49aab7a Branch: refs/heads/master Commit: a49aab7a95fa6059de7ceeaff6325d42781d8f41 Parents: 8cc5cbd Author: Rohit Yadav Authored: Tue Aug 19 14:34:55 2014 +0200 Committer: Rohit Yadav Committed: Tue Aug 19 14:34:55 2014 +0200 ---------------------------------------------------------------------- cloudmonkey/requester.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack-cloudmonkey/blob/a49aab7a/cloudmonkey/requester.py ---------------------------------------------------------------------- diff --git a/cloudmonkey/requester.py b/cloudmonkey/requester.py index 073190c..7073e79 100644 --- a/cloudmonkey/requester.py +++ b/cloudmonkey/requester.py @@ -217,7 +217,9 @@ def monkeyrequest(command, args, isasync, asyncblock, logger, url, response = json.loads(str(response)) except ValueError, e: logger_debug(logger, "Error processing json: %s" % e) - + print "Error processing json:", str(e) + response = None + error = e return response response = process_json(response)