From 22fc18dc46cd605495175fc141029882b036ab4a Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Sat, 15 May 2021 22:47:14 -0400 Subject: Add mirror reachability check Needed error handling Fix internet connection text not showing up and make it red --- archinstall/lib/networking.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'archinstall/lib/networking.py') diff --git a/archinstall/lib/networking.py b/archinstall/lib/networking.py index b0c4b569..8a2f0edd 100644 --- a/archinstall/lib/networking.py +++ b/archinstall/lib/networking.py @@ -26,6 +26,14 @@ def list_interfaces(skip_loopback=True): return interfaces +def check_mirror_reachable(): + try: + check = SysCommand("pacman -Sy") + return check.exit_code == 0 + except: + return False + + def enrich_iface_types(interfaces: dict): result = {} for iface in interfaces: -- cgit v1.2.3-54-g00ecf