diff options
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 | |||
| 37 | from bb.fetch2 import FetchError | 37 | from bb.fetch2 import FetchError |
| 38 | from bb.fetch2 import logger | 38 | from bb.fetch2 import logger |
| 39 | from bb.fetch2 import runfetchcmd | 39 | from bb.fetch2 import runfetchcmd |
| 40 | from bb.utils import export_proxies | ||
| 40 | from bs4 import BeautifulSoup | 41 | from bs4 import BeautifulSoup |
| 41 | from bs4 import SoupStrainer | 42 | from bs4 import SoupStrainer |
| 42 | 43 | ||
| @@ -219,22 +220,6 @@ class Wget(FetchMethod): | |||
| 219 | 220 | ||
| 220 | return resp | 221 | return resp |
| 221 | 222 | ||
| 222 | def export_proxies(d): | ||
| 223 | variables = ['http_proxy', 'HTTP_PROXY', 'https_proxy', 'HTTPS_PROXY', | ||
| 224 | 'ftp_proxy', 'FTP_PROXY', 'no_proxy', 'NO_PROXY'] | ||
| 225 | exported = False | ||
| 226 | |||
| 227 | for v in variables: | ||
| 228 | if v in os.environ.keys(): | ||
| 229 | exported = True | ||
| 230 | else: | ||
| 231 | v_proxy = d.getVar(v, True) | ||
| 232 | if v_proxy is not None: | ||
| 233 | os.environ[v] = v_proxy | ||
| 234 | exported = True | ||
| 235 | |||
| 236 | return exported | ||
| 237 | |||
| 238 | class HTTPMethodFallback(urllib2.BaseHandler): | 223 | class HTTPMethodFallback(urllib2.BaseHandler): |
| 239 | """ | 224 | """ |
| 240 | Fallback to GET if HEAD is not allowed (405 HTTP error) | 225 | Fallback to GET if HEAD is not allowed (405 HTTP error) |
