added option --ignore-proxy

This commit is contained in:
Miroslav Stampar
2010-02-25 20:55:10 +00:00
parent dee15ed0b0
commit 5ebf572cae
4 changed files with 12 additions and 4 deletions

View File

@@ -593,9 +593,8 @@ def __setHTTPProxy():
global proxyHandler
if not conf.proxy:
if conf.hostname in ('localhost', '127.0.0.1'):
proxyHandler = urllib2.ProxyHandler({})
if not conf.proxy and (conf.hostname in ('localhost', '127.0.0.1') or conf.ignoreProxy):
proxyHandler = urllib2.ProxyHandler({})
return
debugMsg = "setting the HTTP proxy to pass by all HTTP requests"