Bug 118671

Summary: webkitpy: replace urllib with urllib2 for downloading additional modules
Product: WebKit Reporter: Brian Holt <brian.holt>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, cjerdonek, commit-queue, dpranke, glenn, mrobinson, rniwa, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Brian Holt 2013-07-15 05:49:46 PDT
Tarball releases for additional modules are downloaded using python’s urllib.  However this fails when traffic is routed through a proxy:

$Tools/Scripts/test-webkitpy fails with error 400.

However the proxy is correctly setup and can download the file with wget.

The solution (and this solves the problem for me) is to replace urllib with urllib2, which should cause no trouble because urllib2 should be available everywhere but has better proxy support.
Comment 1 Brian Holt 2013-07-15 05:52:58 PDT
Created attachment 206658 [details]
Patch
Comment 2 Brian Holt 2013-07-16 05:32:09 PDT
It looks like urllib2 is used quite a lot around the codebase in case that was giving pause for thought

$ find Tools/Scripts/webkitpy -name "*.py" | xargs grep urllib2 | wc -l
132
Comment 3 WebKit Commit Bot 2013-07-16 05:57:57 PDT
Comment on attachment 206658 [details]
Patch

Clearing flags on attachment: 206658

Committed r152717: <http://trac.webkit.org/changeset/152717>
Comment 4 WebKit Commit Bot 2013-07-16 05:58:00 PDT
All reviewed patches have been landed.  Closing bug.