mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-03-12 11:51:09 +00:00
Make download_retry work with non-HTTP urls
urlopen() supports non-http URLs, but when called on them, http-related features are absent - such as getcode(). Make the code work with file:/// URLs.
This commit is contained in:
parent
0b4cd56d68
commit
3814d63666
@ -807,7 +807,7 @@ class AutopkgtestPolicy(BasePolicy):
|
||||
try:
|
||||
req = urlopen(url, timeout=30)
|
||||
code = req.getcode()
|
||||
if 200 <= code < 300:
|
||||
if not code or 200 <= code < 300:
|
||||
return req
|
||||
except socket.timeout as e:
|
||||
self.logger.info(
|
||||
|
Loading…
x
Reference in New Issue
Block a user