mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[V3 Launcher] Fix asking for cli flags after invalid instance selection (#1200)
This commit is contained in:
parent
980e8eeb3e
commit
4ac606b468
@ -208,18 +208,18 @@ def instance_menu():
|
||||
print("{}. {}\n".format(counter+1, name))
|
||||
name_num_map[str(counter+1)] = name
|
||||
counter += 1
|
||||
selection = user_choice()
|
||||
try:
|
||||
selection = int(selection)
|
||||
except ValueError:
|
||||
print("Invalid input! Try again.")
|
||||
return None
|
||||
else:
|
||||
if selection not in list(range(1, counter+1)):
|
||||
print("Invalid selection! Please try again")
|
||||
return None
|
||||
|
||||
while True:
|
||||
selection = user_choice()
|
||||
try:
|
||||
selection = int(selection)
|
||||
except ValueError:
|
||||
print("Invalid input! Please enter a number corresponding to an instance.")
|
||||
else:
|
||||
return name_num_map[str(selection)]
|
||||
if selection not in list(range(1, counter+1)):
|
||||
print("Invalid selection! Please try again")
|
||||
else:
|
||||
return name_num_map[str(selection)]
|
||||
|
||||
|
||||
def clear_screen():
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user