Setup coloredlogs to remove logzero

This commit is contained in:
Ritiek Malhotra
2020-05-03 16:34:49 +05:30
parent ec765119fa
commit 4495755edc
7 changed files with 148 additions and 119 deletions

View File

@@ -52,9 +52,9 @@ def merge(base, overrider):
def prompt_user_for_selection(items):
""" Let the user input a choice. """
logger.info("Choose your number:")
while True:
try:
logger.info("Choose your number:")
the_chosen_one = int(input("> "))
if 1 <= the_chosen_one <= len(items):
return items[the_chosen_one - 1]