mirror of
https://git.codelinaro.org/clo/tools/repo.git
synced 2025-05-29 12:44:09 +08:00
Honor http_proxy variable globally
If the http_proxy environment variable was set, honor it during the entire repo session for any Python created HTTP connections. Change-Id: Ib4ae833cb2cdd47ab0126949f6b399d2c142887d Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@ -563,12 +563,6 @@ class Remote(object):
|
||||
self._review_port = info[2]
|
||||
else:
|
||||
try:
|
||||
if 'http_proxy' in os.environ:
|
||||
proxy_url = os.environ['http_proxy']
|
||||
proxy_support = urllib2.ProxyHandler({"http" : proxy_url, "https" : proxy_url})
|
||||
opener = urllib2.build_opener(proxy_support)
|
||||
urllib2.install_opener(opener)
|
||||
|
||||
info = urlopen(u).read()
|
||||
if info == 'NOT_AVAILABLE':
|
||||
raise UploadError('%s: SSH disabled' % self.review)
|
||||
|
Reference in New Issue
Block a user