--- a/mercurial/url.py Mon Dec 19 02:35:38 2016 +0530
+++ b/mercurial/url.py Mon Dec 19 02:54:49 2016 +0530
@@ -18,6 +18,7 @@
error,
httpconnection as httpconnectionmod,
keepalive,
+ pycompat,
sslutil,
util,
)
@@ -79,7 +80,8 @@
class proxyhandler(urlreq.proxyhandler):
def __init__(self, ui):
- proxyurl = ui.config("http_proxy", "host") or os.getenv('http_proxy')
+ proxyurl = (ui.config("http_proxy", "host") or
+ pycompat.osgetenv('http_proxy'))
# XXX proxyauthinfo = None
if proxyurl:
@@ -97,7 +99,7 @@
no_list.extend([p.lower() for
p in ui.configlist("http_proxy", "no")])
no_list.extend([p.strip().lower() for
- p in os.getenv("no_proxy", '').split(',')
+ p in pycompat.osgetenv("no_proxy", '').split(',')
if p.strip()])
# "http_proxy.always" config is for running tests on localhost
if ui.configbool("http_proxy", "always"):