Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan M. Taylor <dylan@dylanmtaylor.com>2021-04-22 15:18:59 -0400
committerGitHub <noreply@github.com>2021-04-22 15:18:59 -0400
commitbd9d2c9125aa7e08d38093dcf21fcef3d101f4d6 (patch)
tree5576a81739cff4a1daa8b8c1fb2e3553f782e487
parent935b878c962699cb4dc2f4ad209022de2046c7d9 (diff)
Update user_interaction.py
-rw-r--r--archinstall/lib/user_interaction.py24
1 files changed, 13 insertions, 11 deletions
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