Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
Nuovo sito
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
16
Issues
16
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gruppo Web
Nuovo sito
Commits
3fa3bb9a
Commit
3fa3bb9a
authored
4 years ago
by
Mattia Rizzolo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
download: raise a more obvious errors if no mirrors can be found
Signed-off-by:
Mattia Rizzolo
<
mapreri@ubuntu.com
>
parent
ab1b07ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
uitwww/download.py
uitwww/download.py
+11
-5
No files found.
uitwww/download.py
View file @
3fa3bb9a
...
...
@@ -66,12 +66,18 @@ class Downloads:
if
self
.
_cache
is
not
None
:
self
.
_mirrors
=
self
.
_cache
[
"mirrors"
]
else
:
self
.
_mirrors
=
{
distro
:
list
(
sorted
(
launchpad
.
get_cdimage_mirrors
(
self
.
_mirrors
=
{}
for
distro
in
self
.
config
[
"mirrors"
][
"for"
]:
found_mirrors
=
list
(
sorted
(
launchpad
.
get_cdimage_mirrors
(
distro
,
self
.
config
[
"mirrors"
][
"country"
]
)))
for
distro
in
self
.
config
[
"mirrors"
][
"for"
]
}
)))
if
found_mirrors
:
self
.
_mirrors
[
distro
]
=
found_mirrors
if
not
self
.
_mirrors
:
raise
ValueError
(
"No available mirrors found for %(for)s in %(country)s"
%
self
.
config
[
"mirrors"
]
)
return
self
.
_mirrors
@
property
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment