0
0
Fork 0

Allow unsetting the proxy with the --proxy option

main
Philipp Hagemeister 2013-06-09 23:43:18 +02:00
parent 8027175600
commit 53f72b11e5
1 changed files with 5 additions and 2 deletions

View File

@ -392,7 +392,10 @@ def _real_main(argv=None):
# General configuration
cookie_processor = compat_urllib_request.HTTPCookieProcessor(jar)
if opts.proxy:
if opts.proxy is not None:
if opts.proxy == '':
proxies = {}
else:
proxies = {'http': opts.proxy, 'https': opts.proxy}
else:
proxies = compat_urllib_request.getproxies()