simplify proxy code a bit
This commit is contained in:
parent
bd0a539ee0
commit
c0405d820c
|
@ -94,13 +94,12 @@ def find_updates(pkgset, stable_only=True):
|
||||||
|
|
||||||
if http_proxy_url:
|
if http_proxy_url:
|
||||||
http_proxy_spec = urllib.splithost(urllib.splittype(http_proxy_url)[1])[0]
|
http_proxy_spec = urllib.splithost(urllib.splittype(http_proxy_url)[1])[0]
|
||||||
|
transport = ProxiedTransport()
|
||||||
p = ProxiedTransport()
|
transport.set_proxy(http_proxy_spec)
|
||||||
p.set_proxy(http_proxy_spec)
|
|
||||||
|
|
||||||
pypi = Server("http://pypi.python.org/pypi/", transport=p)
|
|
||||||
else:
|
else:
|
||||||
pypi = Server("http://pypi.python.org/pypi/")
|
transport = None
|
||||||
|
|
||||||
|
pypi = Server("http://pypi.python.org/pypi/", transport=transport)
|
||||||
|
|
||||||
pkgname2latest = {}
|
pkgname2latest = {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue