Updated the loop logic for mirrors

It wouldn't break out of the loop since the `valid_mirror` variable was never changed.
This commit is contained in:
Anton Hvornum 2021-04-14 12:08:37 +02:00 committed by GitHub
parent 99fb1304ea
commit 5b3a122141
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -23,12 +23,12 @@ def ask_user_questions():
# Set which region to download packages from during the installation
if not archinstall.arguments.get('mirror-region', None):
valid_mirror = False
while valid_mirror == False:
while True:
try:
archinstall.arguments['mirror-region'] = archinstall.select_mirror_regions(archinstall.list_mirrors())
break
except archinstall.RequirementError as e:
archinstall.log(e, fg="yellow")
archinstall.log(e, fg="red")
else:
selected_region = archinstall.arguments['mirror-region']
archinstall.arguments['mirror-region'] = {selected_region : archinstall.list_mirrors()[selected_region]}