Merge lp:~blueyed/ubuntu-dev-tools/use-proxy-for-download into lp:~ubuntu-dev/ubuntu-dev-tools/trunk

Proposed by Daniel Hahler
Status: Merged
Merged at revision: 1295
Proposed branch: lp:~blueyed/ubuntu-dev-tools/use-proxy-for-download
Merge into: lp:~ubuntu-dev/ubuntu-dev-tools/trunk
Diff against target: 36 lines (+9/-2)
2 files modified
debian/changelog (+6/-1)
ubuntutools/archive.py (+3/-1)
To merge this branch: bzr merge lp:~blueyed/ubuntu-dev-tools/use-proxy-for-download
Reviewer Review Type Date Requested Status
Daniel Holbach (community) Approve
Review via email: mp+97905@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Daniel Holbach (dholbach) wrote :

Good work!

review: Approve
Revision history for this message
Stefano Rivera (stefanor) wrote :

This broke the unit tests. Would you mind having a look at fixing them?

Revision history for this message
Daniel Hahler (blueyed) wrote :

I'm not sure about what test exactly broke.. when running "python setup.py test" there appear to be a lot of failures:
http://paste.ubuntu.com/892919/

Apart from that I would like to fix the tests, but need some help obviously.
Thanks! (and sorry for breaking any test in the first place)

Revision history for this message
Stefano Rivera (stefanor) wrote :

Don't worry, I dealt with it.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-02-29 21:23:05 +0000
3+++ debian/changelog 2012-03-16 15:29:18 +0000
4@@ -1,11 +1,16 @@
5 ubuntu-dev-tools (0.140) UNRELEASED; urgency=low
6
7+ [ Stefano Rivera ]
8 * Bump Standards-Version to 3.9.3, no changes needed.
9 * Update machine-readable copyright Format to 1.0.
10 * pbuilder-dist: Use the same chroot, whether the system-architecture was
11 the supplied architecture or was chosen by default (LP: #943435)
12
13- -- Stefano Rivera <stefanor@debian.org> Sat, 25 Feb 2012 16:09:53 +0200
14+ [ Daniel Hahler ]
15+ * ubuntutools/archive.py: use ProxyHandler in _download_file.
16+ This makes use of the system proxy (e.g. http_proxy).
17+
18+ -- Daniel Hahler <ubuntu@thequod.de> Fri, 16 Mar 2012 16:21:00 +0100
19
20 ubuntu-dev-tools (0.139) unstable; urgency=low
21
22
23=== modified file 'ubuntutools/archive.py'
24--- ubuntutools/archive.py 2011-11-22 13:57:02 +0000
25+++ ubuntutools/archive.py 2012-03-16 15:29:18 +0000
26@@ -317,8 +317,10 @@
27 if parsed.scheme == 'file':
28 in_ = open(parsed.path, 'r')
29 else:
30+ proxy = urllib2.ProxyHandler() # uses default proxy from environment
31+ opener = urllib2.build_opener(proxy)
32 try:
33- in_ = urllib2.urlopen(url)
34+ in_ = opener.open(url)
35 except urllib2.URLError:
36 return False
37

Subscribers

People subscribed via source and target branches

to status/vote changes: