Browse Source

support canceling the selection process

no_compress
Raphael Roberts 7 years ago
parent
commit
3a3c84f742
  1. 6
      main.py

6
main.py

@ -68,7 +68,11 @@ def gen_list(objs,data,*displays,key = None,sort = 0,num_pic = True):
which = None
while not which:
try:
which = srt_keys[int(input('Which one?: '))]
which = input('Which one?: ')
except KeyboardInterrupt:
quit()
try:
which = srt_keys[int(which)]
except ValueError:
which = None
return display_data[which]

Loading…
Cancel
Save