Merge pull request #345 from dylanmtaylor/patch-9
Ignore dotfiles and globs in timezone selection
This commit is contained in:
commit
638985f17d
|
|
@ -131,7 +131,7 @@ def ask_for_additional_users(prompt='Any additional users to install (leave blan
|
||||||
|
|
||||||
def ask_for_a_timezone():
|
def ask_for_a_timezone():
|
||||||
while True:
|
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 == '':
|
if timezone == '':
|
||||||
timezone = 'UTC'
|
timezone = 'UTC'
|
||||||
if (pathlib.Path("/usr")/"share"/"zoneinfo"/timezone).exists():
|
if (pathlib.Path("/usr")/"share"/"zoneinfo"/timezone).exists():
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue