download ISOs with urllib2 not urlgrabber
ClosedPublic

Authored by adamwill on Sep 19 2015, 4:36 AM.

Details

Summary

urlgrabber is old, not in the stdlib, and openSUSE's current
version doesn't handle https properly. urlllib.urlretrieve()
is a possibility but urllib (in py2) doesn't do TLS right. So
we'll do this, adapted from SO, using urllib2 (py3 urllib).
This only works for HTTP(S) of course, but all fedfind URLs
are HTTPS and that's not likely to change. Fixes T601.

We could use requests since openqa_client depends on it anyway,
but it isn't actually any easier for downloading big files
than urllib2, oddly enough.

Test Plan

Check that ISO downloads still work.

Diff Detail

Repository
rOPENQA fedora_openqa
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
adamwill retitled this revision from to download ISOs with urllib2 not urlgrabber.Sep 19 2015, 4:36 AM
adamwill updated this object.
adamwill edited the test plan for this revision. (Show Details)
adamwill added reviewers: jskladan, garretraziel.
garretraziel requested changes to this revision.Sep 21 2015, 8:47 AM
garretraziel added inline comments.
fedora_openqa_schedule/schedule.py
31

I don't think that six is a standard library - move to "external dependencies".

98

There are too few arguments here :-).

101

Document this "magic value", please - was it arbitrary chosen or does it have any meaning?

This revision now requires changes to proceed.Sep 21 2015, 8:47 AM
adamwill added inline comments.Sep 21 2015, 3:03 PM
fedora_openqa_schedule/schedule.py
98

d'oh, guess who was testing with a test script not the real code :)

adamwill updated this revision to Diff 1551.Sep 21 2015, 3:43 PM

Address garretraziel's comments (all 3 valid)

garretraziel accepted this revision.Sep 22 2015, 6:44 AM
This revision is now accepted and ready to land.Sep 22 2015, 6:44 AM
This revision was automatically updated to reflect the committed changes.