mercurial/hg.py
changeset 859 6390c377a9e6
parent 856 fbe964ae7325
child 866 6d6095823b82
child 871 c2e77581bc84
child 872 9a0af739cf55
child 882 bc9ca4d51d23
equal deleted inserted replaced
858:c333dfa8fa1a 859:6390c377a9e6
  1779                 no_proxy = 1
  1779                 no_proxy = 1
  1780 
  1780 
  1781         # Note: urllib2 takes proxy values from the environment and those will
  1781         # Note: urllib2 takes proxy values from the environment and those will
  1782         # take precedence
  1782         # take precedence
  1783         for env in ["HTTP_PROXY", "http_proxy", "no_proxy"]:
  1783         for env in ["HTTP_PROXY", "http_proxy", "no_proxy"]:
  1784             if os.environ.has_key(env):
  1784             try:
  1785                 del os.environ[env]
  1785                 if os.environ.has_key(env):
       
  1786                     del os.environ[env]
       
  1787             except OSError:
       
  1788                 pass
  1786 
  1789 
  1787         proxy_handler = urllib2.BaseHandler()
  1790         proxy_handler = urllib2.BaseHandler()
  1788         if host and not no_proxy:
  1791         if host and not no_proxy:
  1789             proxy_handler = urllib2.ProxyHandler({"http" : "http://" + host})
  1792             proxy_handler = urllib2.ProxyHandler({"http" : "http://" + host})
  1790 
  1793