From 649c0ddb55f232f8756de4fb5ef3a0b4549eaaa8 Mon Sep 17 00:00:00 2001 From: Maciek Date: Wed, 5 Feb 2014 13:10:00 -0800 Subject: [PATCH] Bug 950107 - Support ALL_PROXY in bootstraper; r=gps DONTBUILD (NPOTB) --HG-- extra : amend_source : cd0913f142f9dfcba18aa5e6925d7a4e6280d975 --- python/mozboot/bin/bootstrap.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/python/mozboot/bin/bootstrap.py b/python/mozboot/bin/bootstrap.py index 064c807e5fee..954dd52810f6 100755 --- a/python/mozboot/bin/bootstrap.py +++ b/python/mozboot/bin/bootstrap.py @@ -46,7 +46,17 @@ REPOSITORY_PATHS = [ TEMPDIR = None +def setup_proxy(): + # Some Linux environments define ALL_PROXY, which is a SOCKS proxy + # intended for all protocols. Python doesn't currently automatically + # detect this like it does for http_proxy and https_proxy. + if 'ALL_PROXY' in os.environ and 'https_proxy' not in os.environ: + os.environ['https_proxy'] = os.environ['ALL_PROXY'] + if 'ALL_PROXY' in os.environ and 'http_proxy' not in os.environ: + os.environ['http_proxy'] = os.environ['ALL_PROXY'] + def fetch_files(repo_url, repo_type): + setup_proxy() repo_url = repo_url.rstrip('/') files = {}