Allows to use proxy vars of OS env

Submitted by Edwin Plauchu on May 9, 2016, 4:21 p.m. | Patch ID: 121991

Details

Message ID 1462810908-14676-1-git-send-email-edwin.plauchu.camacho@linux.intel.com
State New
Headers show

Commit Message

Edwin Plauchu May 9, 2016, 4:21 p.m.
From: Edwin Plauchu <edwin.plauchu.camacho@intel.com>

This improve allows to fetch values from OS env. Covering an scenario where proxy variables have no value within data storage.
---
 meta/lib/oe/distro_check.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/meta/lib/oe/distro_check.py b/meta/lib/oe/distro_check.py
index 8655a6f..6e87323 100644
--- a/meta/lib/oe/distro_check.py
+++ b/meta/lib/oe/distro_check.py
@@ -11,7 +11,7 @@  def create_socket(url, d):
 def get_proxies(d):
     proxies = {}
     for key in ['http', 'https', 'ftp', 'ftps', 'no', 'all']:
-        proxy = d.getVar(key + '_proxy', True)
+        proxy = os.environ.get( key + '_proxy' ) or d.getVar(key + '_proxy', True)
         if proxy:
             proxies[key] = proxy
     return proxies