Bug 118671 - webkitpy: replace urllib with urllib2 for downloading additional modules
Summary: webkitpy: replace urllib with urllib2 for downloading additional modules
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-15 05:49 PDT by Brian Holt
Modified: 2013-07-16 05:58 PDT (History)
8 users (show)

See Also:


Attachments
Patch (1.54 KB, patch)
2013-07-15 05:52 PDT, Brian Holt
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.