[V3 Launcher] Fix asking for cli flags after invalid instance selection (#1200)

This commit is contained in:
Tobotimus 2018-01-15 15:11:24 +11:00 committed by palmtree5
parent 980e8eeb3e
commit 4ac606b468

View File

@ -208,16 +208,16 @@ def instance_menu():
print("{}. {}\n".format(counter+1, name))
name_num_map[str(counter+1)] = name
counter += 1
while True:
selection = user_choice()
try:
selection = int(selection)
except ValueError:
print("Invalid input! Try again.")
return None
print("Invalid input! Please enter a number corresponding to an instance.")
else:
if selection not in list(range(1, counter+1)):
print("Invalid selection! Please try again")
return None
else:
return name_num_map[str(selection)]