Skip to contentSkip to conversation

distro_check: Allows to use proxy vars of OS env

PATCH New [email protected] 1 participant 1 message May 9, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 distro_check: Allows to use proxy vars of OS env

From: Edwin Plauchu <[email protected]>

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(-)
meta/lib/oe/distro_check.py +1 -1
index 8655a6f..6e87323 100644
@@ -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
Signature · 1 line
1.9.1