index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Andreas Baumann <mail@andreasbaumann.cc> | 2022-09-30 17:25:43 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2022-09-30 17:25:43 +0200 |
commit | 6408c9dce00aa70ad3c6614d2d793dba9a99aff6 (patch) | |
tree | bff1889dfebde0c74e30e9de427a2c122513684b /archinstall/lib/networking.py | |
parent | faf925de1882be722d2994d697a802918282e509 (diff) | |
parent | 53a2797af6ac0832bf7dd00dfe96b8ea1867db2e (diff) |
-rw-r--r-- | archinstall/lib/networking.py | 15 |
diff --git a/archinstall/lib/networking.py b/archinstall/lib/networking.py index 3e883a7b..96e8f3a1 100644 --- a/archinstall/lib/networking.py +++ b/archinstall/lib/networking.py @@ -4,7 +4,7 @@ import socket import struct from typing import Union, Dict, Any, List -from .exceptions import HardwareIncompatibilityError +from .exceptions import HardwareIncompatibilityError, SysCallError from .general import SysCommand from .output import log from .pacman import run_pacman @@ -33,14 +33,17 @@ def list_interfaces(skip_loopback :bool = True) -> Dict[str, str]: def check_mirror_reachable() -> bool: log("Testing connectivity to the Arch Linux mirrors ...", level=logging.INFO) - if run_pacman("-Sy").exit_code == 0: - return True - - elif os.geteuid() != 0: - log("check_mirror_reachable() uses 'pacman -Sy' which requires root.", level=logging.ERROR, fg="red") + try: + if run_pacman("-Sy").exit_code == 0: + return True + elif os.geteuid() != 0: + log("check_mirror_reachable() uses 'pacman -Sy' which requires root.", level=logging.ERROR, fg="red") + except SysCallError as err: + log(err, level=logging.DEBUG) return False + def update_keyring() -> bool: log("Updating archlinux-keyring ...", level=logging.INFO) if run_pacman("-Sy --noconfirm archlinux-keyring").exit_code == 0: |