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:
Diffstat (limited to 'archinstall/lib/mirrors.py')
-rw-r--r--archinstall/lib/mirrors.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/archinstall/lib/mirrors.py b/archinstall/lib/mirrors.py
index 15d0fd6b..c6c5c8e4 100644
--- a/archinstall/lib/mirrors.py
+++ b/archinstall/lib/mirrors.py
@@ -7,6 +7,7 @@ from dataclasses import dataclass
from .general import SysCommand
from .output import log
+from .exceptions import SysCallError
from .storage import storage
@@ -148,8 +149,9 @@ def re_rank_mirrors(
src: str = '/etc/pacman.d/mirrorlist',
dst: str = '/etc/pacman.d/mirrorlist',
) -> bool:
- cmd = SysCommand(f"/usr/bin/rankmirrors -n {top} {src}")
- if cmd.exit_code != 0:
+ try:
+ cmd = SysCommand(f"/usr/bin/rankmirrors -n {top} {src}")
+ except SysCallError:
return False
with open(dst, 'w') as f:
f.write(str(cmd))