author | mpm@selenic.com |
Fri, 12 Aug 2005 23:54:09 -0800 | |
changeset 866 | 6d6095823b82 |
parent 859 | 6390c377a9e6 (diff) |
parent 865 | 2d2fee33ec68 (current diff) |
child 867 | 0cd2ee61b10a |
child 894 | 62ec665759f2 |
--- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -1801,8 +1801,11 @@ class httprepository: # Note: urllib2 takes proxy values from the environment and those will # take precedence for env in ["HTTP_PROXY", "http_proxy", "no_proxy"]: - if os.environ.has_key(env): - del os.environ[env] + try: + if os.environ.has_key(env): + del os.environ[env] + except OSError: + pass proxy_handler = urllib2.BaseHandler() if host and not no_proxy: