index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | advaithm <advaith.madhukar@gmail.com> | 2021-04-14 14:47:57 +0530 |
---|---|---|
committer | advaithm <advaith.madhukar@gmail.com> | 2021-04-14 14:47:57 +0530 |
commit | df3f7af91b28c3df75e9be8f2a961a408f3e5dbb (patch) | |
tree | 3174010f5a1bf0232ead21258f88f52e83f5f8c2 | |
parent | 5aad8092742d4342e76cc32d9d4049b6b8f0c1a4 (diff) |
-rw-r--r-- | examples/guided.py | 9 |
diff --git a/examples/guided.py b/examples/guided.py index 53dc1f09..8be47b82 100644 --- a/examples/guided.py +++ b/examples/guided.py @@ -1,3 +1,4 @@ +from archinstall.lib.exceptions import RequirementError import getpass, time, json, os import archinstall from archinstall.lib.hardware import hasUEFI @@ -23,8 +24,12 @@ def ask_user_questions(): # Set which region to download packages from during the installation if not archinstall.arguments.get('mirror-region', None): - while archinstall.arguments.get("mirror-region",{}) == {}: - archinstall.arguments['mirror-region'] = archinstall.select_mirror_regions(archinstall.list_mirrors()) + valid_mirror = False + while valid_mirror == False: + try: + archinstall.arguments['mirror-region'] = archinstall.select_mirror_regions(archinstall.list_mirrors()) + except RequirementError as e: + archinstall.log(e, fg="yellow") else: selected_region = archinstall.arguments['mirror-region'] archinstall.arguments['mirror-region'] = {selected_region : archinstall.list_mirrors()[selected_region]} |