index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Dylan M. Taylor <dylan@dylanmtaylor.com> | 2021-04-22 15:18:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-22 15:18:59 -0400 |
commit | bd9d2c9125aa7e08d38093dcf21fcef3d101f4d6 (patch) | |
tree | 5576a81739cff4a1daa8b8c1fb2e3553f782e487 /archinstall | |
parent | 935b878c962699cb4dc2f4ad209022de2046c7d9 (diff) |
-rw-r--r-- | archinstall/lib/user_interaction.py | 24 |
diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py index 77b3d771..a481dac3 100644 --- a/archinstall/lib/user_interaction.py +++ b/archinstall/lib/user_interaction.py @@ -130,17 +130,19 @@ def ask_for_additional_users(prompt='Any additional users to install (leave blan return users, super_users def ask_for_a_timezone(): - timezone = input('Enter a valid timezone (examples: Europe/Stockholm, US/Eastern) or press enter to use UTC: ').strip() - if timezone == '': - timezone = 'UTC' - if (pathlib.Path("/usr")/"share"/"zoneinfo"/timezone).exists(): - return timezone - else: - log( - f"Time zone {timezone} does not exist, continuing with system default.", - level=LOG_LEVELS.Warning, - fg='red' - ) + exists = False + while not exists: + timezone = input('Enter a valid timezone (examples: Europe/Stockholm, US/Eastern) or press enter to use UTC: ').strip() + if timezone == '': + timezone = 'UTC' + if (pathlib.Path("/usr")/"share"/"zoneinfo"/timezone).exists(): + return timezone + else: + log( + f"Specified timezone {timezone} does not exist.", + level=LOG_LEVELS.Warning, + fg='red' + ) def ask_for_audio_selection(): audio = "pulseaudio" # Default for most desktop environments |