Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDylan M. Taylor <dylan@dylanmtaylor.com>2021-05-15 22:47:14 -0400
committerDylan Taylor <dylan@dylanmtaylor.com>2021-05-15 22:53:58 -0400
commit22fc18dc46cd605495175fc141029882b036ab4a (patch)
tree65db5468e6ad461d90a3b62dc55d52b28a2d1d32 /examples
parente3c8692bfa65d9b689bb50f9a4469989332adde4 (diff)
Add mirror reachability check
Needed error handling Fix internet connection text not showing up and make it red
Diffstat (limited to 'examples')
-rw-r--r--examples/guided.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/guided.py b/examples/guided.py
index 177f4adb..cce06b29 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -4,6 +4,7 @@ import time
import archinstall
from archinstall.lib.hardware import has_uefi
+from archinstall.lib.networking import check_mirror_reachable
if archinstall.arguments.get('help'):
print("See `man archinstall` for help.")
@@ -387,5 +388,9 @@ def perform_installation(mountpoint):
archinstall.log(f"Disk states after installing: {archinstall.disk_layouts()}", level=logging.DEBUG)
+if not check_mirror_reachable():
+ archinstall.log("Arch Linux mirrors are not reachable. Please check your internet connection and try again.", level=logging.INFO, fg="red")
+ exit(1)
+
ask_user_questions()
perform_installation_steps()