From notifications-return-13353-apmail-libcloud-notifications-archive=libcloud.apache.org@libcloud.apache.org Mon Jun 19 11:30:05 2017 Return-Path: X-Original-To: apmail-libcloud-notifications-archive@www.apache.org Delivered-To: apmail-libcloud-notifications-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E05671950E for ; Mon, 19 Jun 2017 11:30:04 +0000 (UTC) Received: (qmail 5402 invoked by uid 500); 19 Jun 2017 11:30:04 -0000 Delivered-To: apmail-libcloud-notifications-archive@libcloud.apache.org Received: (qmail 5275 invoked by uid 500); 19 Jun 2017 11:30:04 -0000 Mailing-List: contact notifications-help@libcloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@libcloud.apache.org Delivered-To: mailing list notifications@libcloud.apache.org Received: (qmail 5162 invoked by uid 99); 19 Jun 2017 11:30:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Jun 2017 11:30:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 40AD41B0794 for ; Mon, 19 Jun 2017 11:30:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 3bthzauCHjnI for ; Mon, 19 Jun 2017 11:30:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 3C0D05FCAC for ; Mon, 19 Jun 2017 11:30:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id B33B8E0BE0 for ; Mon, 19 Jun 2017 11:30:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 21E5F23FFE for ; Mon, 19 Jun 2017 11:30:00 +0000 (UTC) Date: Mon, 19 Jun 2017 11:30:00 +0000 (UTC) From: "Miguel Caballer (JIRA)" To: notifications@libcloud.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (LIBCLOUD-925) Error in GCE driver in function _get_error MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Miguel Caballer created LIBCLOUD-925: ---------------------------------------- Summary: Error in GCE driver in function _get_error Key: LIBCLOUD-925 URL: https://issues.apache.org/jira/browse/LIBCLOUD-925 Project: Libcloud Issue Type: Bug Reporter: Miguel Caballer Priority: Minor _get_error function assumes that the body['error'] value is a dict, but in some cases it contains an string (unicode). So it tries to do a err.get and it failts. I has to be something like that: if 'code' in err: code = err.get('code') message = err.get('message') else: code = None if 'reason' in err: code = err.get('reason') message = body.get('error_description', err) -- This message was sent by Atlassian JIRA (v6.4.14#64029)