##// END OF EJS Templates
url: remove unnecessary deletion of environ variables while dealing with proxy...
Pulkit Goyal -
r30662:69459fdf default
parent child Browse files
Show More
@@ -15,7 +15,6 b' import socket'
15
15
16 from .i18n import _
16 from .i18n import _
17 from . import (
17 from . import (
18 encoding,
19 error,
18 error,
20 httpconnection as httpconnectionmod,
19 httpconnection as httpconnectionmod,
21 keepalive,
20 keepalive,
@@ -113,17 +112,6 b' class proxyhandler(urlreq.proxyhandler):'
113 else:
112 else:
114 proxies = {}
113 proxies = {}
115
114
116 # urllib2 takes proxy values from the environment and those
117 # will take precedence if found. So, if there's a config entry
118 # defining a proxy, drop the environment ones
119 if ui.config("http_proxy", "host"):
120 for env in ["HTTP_PROXY", "http_proxy", "no_proxy"]:
121 try:
122 if env in encoding.environ:
123 del encoding.environ[env]
124 except OSError:
125 pass
126
127 urlreq.proxyhandler.__init__(self, proxies)
115 urlreq.proxyhandler.__init__(self, proxies)
128 self.ui = ui
116 self.ui = ui
129
117
General Comments 0
You need to be logged in to leave comments. Login now