index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton@hvornum.se> | 2021-04-22 19:46:54 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-22 19:46:54 +0000 |
commit | 1c6aa6b8f4c46d947016ae66d847c9af625dde55 (patch) | |
tree | 7fdf695e90ae4e00773a453cb673e82871bed766 | |
parent | 935b878c962699cb4dc2f4ad209022de2046c7d9 (diff) | |
parent | 74951b841c9906511731408bc5d3a70a7d6ae65f (diff) |
-rw-r--r-- | archinstall/lib/user_interaction.py | 23 |
diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py index 77b3d771..dcb51e2a 100644 --- a/archinstall/lib/user_interaction.py +++ b/archinstall/lib/user_interaction.py @@ -130,17 +130,18 @@ 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' - ) + while True: + 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 |