diff options
author | Shawn O. Pearce <sop@google.com> | 2011-09-11 12:57:15 -0700 |
---|---|---|
committer | Shawn O. Pearce <sop@google.com> | 2011-09-11 13:11:04 -0700 |
commit | 014d0609899dba70a1af0b32de377ca08c54aded (patch) | |
tree | cffe8353d15a9cf3ab03f3c2e8f244570650fbb4 /git_config.py | |
parent | 44da16e8a0e919c60a6eb7b5503cf915864d7336 (diff) | |
download | git-repo-014d0609899dba70a1af0b32de377ca08c54aded.tar.gz |
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>
Diffstat (limited to 'git_config.py')
-rw-r--r-- | git_config.py | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/git_config.py b/git_config.py index 289a5b64..19c19f19 100644 --- a/git_config.py +++ b/git_config.py | |||
@@ -563,12 +563,6 @@ class Remote(object): | |||
563 | self._review_port = info[2] | 563 | self._review_port = info[2] |
564 | else: | 564 | else: |
565 | try: | 565 | try: |
566 | if 'http_proxy' in os.environ: | ||
567 | proxy_url = os.environ['http_proxy'] | ||
568 | proxy_support = urllib2.ProxyHandler({"http" : proxy_url, "https" : proxy_url}) | ||
569 | opener = urllib2.build_opener(proxy_support) | ||
570 | urllib2.install_opener(opener) | ||
571 | |||
572 | info = urlopen(u).read() | 566 | info = urlopen(u).read() |
573 | if info == 'NOT_AVAILABLE': | 567 | if info == 'NOT_AVAILABLE': |
574 | raise UploadError('%s: SSH disabled' % self.review) | 568 | raise UploadError('%s: SSH disabled' % self.review) |