Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/mirrors.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds@gmail.com>2021-04-17 09:52:09 +0200
committerAnton Hvornum <anton.feeds@gmail.com>2021-04-17 09:52:09 +0200
commit5fba277dda00c32ed7cecd6c497c0ced922598e6 (patch)
tree04433f76cda1519d94044bdec46a5cb54c709d5c /archinstall/lib/mirrors.py
parente5b0468384ba70398b91c5418399b0118ece0bc5 (diff)
parent407290b03483ebed95e5f02c6b60024bd331ba1d (diff)
Merging in master to feature branch.
Diffstat (limited to 'archinstall/lib/mirrors.py')
-rw-r--r--archinstall/lib/mirrors.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/archinstall/lib/mirrors.py b/archinstall/lib/mirrors.py
index d7d35782..04f47c0d 100644
--- a/archinstall/lib/mirrors.py
+++ b/archinstall/lib/mirrors.py
@@ -74,10 +74,15 @@ def re_rank_mirrors(top=10, *positionals, **kwargs):
def list_mirrors():
url = f"https://archlinux.org/mirrorlist/?protocol=https&ip_version=4&ip_version=6&use_mirror_status=on"
-
- response = urllib.request.urlopen(url)
regions = {}
+ try:
+ response = urllib.request.urlopen(url)
+ except urllib.error.URLError as err:
+ log(f'Could not fetch an active mirror-list: {err}', level=LOG_LEVELS.Warning, fg="yellow")
+ return regions
+
+
region = 'Unknown region'
for line in response.readlines():
if len(line.strip()) == 0: