mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
ubuntutools/archive.py: use ProxyHandler in _download_file.
This makes use of the system proxy (e.g. http_proxy).
This commit is contained in:
parent
2e9d81bdda
commit
ee569590a6
7
debian/changelog
vendored
7
debian/changelog
vendored
@ -1,11 +1,16 @@
|
|||||||
ubuntu-dev-tools (0.140) UNRELEASED; urgency=low
|
ubuntu-dev-tools (0.140) UNRELEASED; urgency=low
|
||||||
|
|
||||||
|
[ Stefano Rivera ]
|
||||||
* Bump Standards-Version to 3.9.3, no changes needed.
|
* Bump Standards-Version to 3.9.3, no changes needed.
|
||||||
* Update machine-readable copyright Format to 1.0.
|
* Update machine-readable copyright Format to 1.0.
|
||||||
* pbuilder-dist: Use the same chroot, whether the system-architecture was
|
* pbuilder-dist: Use the same chroot, whether the system-architecture was
|
||||||
the supplied architecture or was chosen by default (LP: #943435)
|
the supplied architecture or was chosen by default (LP: #943435)
|
||||||
|
|
||||||
-- Stefano Rivera <stefanor@debian.org> Sat, 25 Feb 2012 16:09:53 +0200
|
[ Daniel Hahler ]
|
||||||
|
* ubuntutools/archive.py: use ProxyHandler in _download_file.
|
||||||
|
This makes use of the system proxy (e.g. http_proxy).
|
||||||
|
|
||||||
|
-- Daniel Hahler <ubuntu@thequod.de> Fri, 16 Mar 2012 16:21:00 +0100
|
||||||
|
|
||||||
ubuntu-dev-tools (0.139) unstable; urgency=low
|
ubuntu-dev-tools (0.139) unstable; urgency=low
|
||||||
|
|
||||||
|
@ -317,8 +317,10 @@ class SourcePackage(object):
|
|||||||
if parsed.scheme == 'file':
|
if parsed.scheme == 'file':
|
||||||
in_ = open(parsed.path, 'r')
|
in_ = open(parsed.path, 'r')
|
||||||
else:
|
else:
|
||||||
|
proxy = urllib2.ProxyHandler() # uses default proxy from environment
|
||||||
|
opener = urllib2.build_opener(proxy)
|
||||||
try:
|
try:
|
||||||
in_ = urllib2.urlopen(url)
|
in_ = opener.open(url)
|
||||||
except urllib2.URLError:
|
except urllib2.URLError:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user