Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id EAE93E00F10; Tue, 19 Apr 2016 05:19:40 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id C2745E00D8A for ; Tue, 19 Apr 2016 05:19:37 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP; 19 Apr 2016 05:19:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,506,1455004800"; d="scan'208";a="935576232" Received: from santhige-mobl.ger.corp.intel.com (HELO lp.ger.corp.intel.com) ([10.252.8.209]) by orsmga001.jf.intel.com with ESMTP; 19 Apr 2016 05:19:36 -0700 From: Elliot Smith To: toaster@yoctoproject.org Date: Tue, 19 Apr 2016 13:19:26 +0100 Message-Id: <1461068366-24796-1-git-send-email-elliot.smith@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [PATCH] toaster: show https proxy in error output X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2016 12:19:41 -0000 urllib2 automatically uses any http_proxy and https_proxy settings from the environment. Now that the layer index is available over https, there is a possibility that a user may experience an error while fetching layer index. In this situation, show the https_proxy setting as well as the http_proxy setting in the error. [YOCTO #9439] Signed-off-by: Elliot Smith --- bitbake/lib/toaster/orm/models.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 68c3072..90e3f6a 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py @@ -1096,7 +1096,10 @@ class LayerIndexLayerSource(LayerSource): import urllib2, urlparse, json import os - proxy_settings = os.environ.get("http_proxy", None) + proxy_settings = ( + os.environ.get("http_proxy", None), + os.environ.get("https_proxy", None) + ) oe_core_layer = 'openembedded-core' def _get_json_response(apiurl = self.apiurl): @@ -1116,7 +1119,7 @@ class LayerIndexLayerSource(LayerSource): except Exception as e: import traceback if proxy_settings is not None: - logger.info("EE: Using proxy %s" % proxy_settings) + logger.info("EE: Using HTTP proxy %s and HTTPS proxy %s" % proxy_settings) logger.warning("EE: could not connect to %s, skipping update: %s\n%s" % (self.apiurl, e, traceback.format_exc(e))) return -- 1.9.3 --------------------------------------------------------------------- Intel Corporation (UK) Limited Registered No. 1134945 (England) Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.