diff options
author | Aníbal Limón <anibal.limon@linux.intel.com> | 2016-01-28 16:27:52 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-08 10:52:40 +0000 |
commit | d0d85a4d6b6961b3558c9f875f3a621d71ffcf92 (patch) | |
tree | e6cd4ed904d1faf8eedd30dc5e96ea6e51daa38a /bitbake/lib/bb/fetch2/wget.py | |
parent | 7226ce2830d8b61457a6bf54c3227e782cc2ca48 (diff) | |
download | openembedded-core-contrib-d0d85a4d6b6961b3558c9f875f3a621d71ffcf92.tar.gz |
bitbake: bb/fetch2: Move export_proxies function from wget to utils.
In order to use in other modules since is a common function
when needs to get proxies working.
(Bitbake rev: 85c529044381895556d603a3974de22392646a22)
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/wget.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/wget.py | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py index 5a31730a4a..fd25c42436 100644 --- a/bitbake/lib/bb/fetch2/wget.py +++ b/bitbake/lib/bb/fetch2/wget.py @@ -37,6 +37,7 @@ from bb.fetch2 import FetchMethod from bb.fetch2 import FetchError from bb.fetch2 import logger from bb.fetch2 import runfetchcmd +from bb.utils import export_proxies from bs4 import BeautifulSoup from bs4 import SoupStrainer @@ -219,22 +220,6 @@ class Wget(FetchMethod): return resp - def export_proxies(d): - variables = ['http_proxy', 'HTTP_PROXY', 'https_proxy', 'HTTPS_PROXY', - 'ftp_proxy', 'FTP_PROXY', 'no_proxy', 'NO_PROXY'] - exported = False - - for v in variables: - if v in os.environ.keys(): - exported = True - else: - v_proxy = d.getVar(v, True) - if v_proxy is not None: - os.environ[v] = v_proxy - exported = True - - return exported - class HTTPMethodFallback(urllib2.BaseHandler): """ Fallback to GET if HEAD is not allowed (405 HTTP error) |