From 95e73f65a7ea41c49ba2186124517d52dd962eb8 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Thu, 22 Apr 2021 19:36:32 -0400 Subject: Ignore dotfiles and globs --- archinstall/lib/user_interaction.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'archinstall/lib') diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py index dcb51e2a..b1437382 100644 --- a/archinstall/lib/user_interaction.py +++ b/archinstall/lib/user_interaction.py @@ -134,7 +134,7 @@ 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(): + if (pathlib.Path("/usr")/"share"/"zoneinfo"/timezone.strip('*.')).exists(): return timezone else: log( -- cgit v1.2.3-70-g09d2 From d21e31d4779593bd371ef0a301f4dc0a4d79cc1f Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Thu, 22 Apr 2021 19:38:43 -0400 Subject: Actually, putting it here makes more sense. --- archinstall/lib/user_interaction.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'archinstall/lib') diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py index b1437382..89c54f78 100644 --- a/archinstall/lib/user_interaction.py +++ b/archinstall/lib/user_interaction.py @@ -131,10 +131,10 @@ def ask_for_additional_users(prompt='Any additional users to install (leave blan def ask_for_a_timezone(): while True: - timezone = input('Enter a valid timezone (examples: Europe/Stockholm, US/Eastern) or press enter to use UTC: ').strip() + timezone = input('Enter a valid timezone (examples: Europe/Stockholm, US/Eastern) or press enter to use UTC: ').strip().strip('*.') if timezone == '': timezone = 'UTC' - if (pathlib.Path("/usr")/"share"/"zoneinfo"/timezone.strip('*.')).exists(): + if (pathlib.Path("/usr")/"share"/"zoneinfo"/timezone).exists(): return timezone else: log( -- cgit v1.2.3-70-g09d2