index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | archinstall/lib/mirrors.py | 6 |
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)) |