Merge lp:~roadmr/checkbox/fix-http-proxy into lp:checkbox

Proposed by Daniel Manrique
Status: Merged
Merged at revision: 1536
Proposed branch: lp:~roadmr/checkbox/fix-http-proxy
Merge into: lp:checkbox
Diff against target: 42 lines (+5/-2)
2 files modified
debian/changelog (+3/-1)
scripts/network_check (+2/-1)
To merge this branch: bzr merge lp:~roadmr/checkbox/fix-http-proxy
Reviewer Review Type Date Requested Status
Marc Tardif (community) Approve
Review via email: mp+116736@code.launchpad.net

Description of the change

Handles an exception that's thrown if the configured http_proxy variable is invalid.

To post a comment you must log in.
Revision history for this message
Marc Tardif (cr3) wrote :

This is one of those cases where I'm happy we didn't decide to support *both* python2 and python3, because InvalidURL is in httplib and http.client respectively. Looks good, thanks!

review: Approve

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-07-25 19:25:37 +0000
3+++ debian/changelog 2012-07-25 19:41:20 +0000
4@@ -18,6 +18,8 @@
5 (LP: #1022593)
6 * jobs/user_apps.txt.in: Quicktime test now depends on gstreamer0.10-ffmpeg
7 to ensure it's able to play .mov files (LP: #633009)
8+ * scripts/network_check: InvalidURL exception is caught and handled more
9+ cleanly (LP: #751701)
10
11 [Sylvain Pineau]
12 * jobs/usb.txt.in, scripts/disk_read_performance_test: Add a USB3 read
13@@ -31,7 +33,7 @@
14 [Marc Tardif]
15 * Escaping encoded strings in udevadm output (LP: #1025381)
16
17- -- Daniel Manrique <roadmr@ubuntu.com> Wed, 25 Jul 2012 15:07:48 -0400
18+ -- Daniel Manrique <roadmr@ubuntu.com> Wed, 25 Jul 2012 15:30:11 -0400
19
20 checkbox (0.14.2) quantal; urgency=low
21
22
23=== modified file 'scripts/network_check'
24--- scripts/network_check 2012-06-05 21:49:57 +0000
25+++ scripts/network_check 2012-07-25 19:41:20 +0000
26@@ -5,6 +5,7 @@
27 """
28 from subprocess import call
29 from argparse import ArgumentParser
30+import http.client
31 import urllib.request, urllib.error, urllib.parse
32 import sys
33
34@@ -15,7 +16,7 @@
35 """
36 try:
37 urllib.request.urlopen(url)
38- except urllib.error.URLError:
39+ except (urllib.error.URLError, http.client.InvalidURL):
40 return False
41
42 return True

Subscribers

People subscribed via source and target branches