forked from Mirror/pmbootstrap
Show UI selection ordered by name, none
remains at the beginning (#1092)
Fixes random UI selection screen for Python <3.6.
This commit is contained in:
parent
2eed96201b
commit
748f2ce6b1
2 changed files with 6 additions and 6 deletions
|
@ -70,11 +70,11 @@ def ask_for_ui(args):
|
|||
ui_list = pmb.helpers.ui.list(args)
|
||||
logging.info("Available user interfaces (" +
|
||||
str(len(ui_list) - 1) + "): ")
|
||||
for ui, description in ui_list.items():
|
||||
logging.info("* " + ui + ": " + description)
|
||||
for ui in ui_list:
|
||||
logging.info("* " + ui[0] + ": " + ui[1])
|
||||
while True:
|
||||
ret = pmb.helpers.cli.ask(args, "User interface", None, args.ui, True)
|
||||
if ret in ui_list:
|
||||
if ret in dict(ui_list).keys():
|
||||
return ret
|
||||
logging.fatal("ERROR: Invalid user interface specified, please type in"
|
||||
" one from the list above.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue