mirror of
https://github.com/certbot/certbot.git
synced 2026-06-03 22:08:07 -04:00
NcursesDisplay.menu: treat ESC as cancel
Currently it will fire a weird traceback like:
File "/home/ubuntu/letsencrypt/letsencrypt/plugins/selection.py", line 113, in choose_plugin
code, index = disp.menu(question, opts, help_label="More Info")
File "/home/ubuntu/letsencrypt/letsencrypt/display/util.py", line 129, in menu
return code, int(index) - 1
ValueError: invalid literal for int() with base 10: ''
This commit is contained in:
parent
cb4fa906d8
commit
ac2ec3457d
1 changed files with 1 additions and 1 deletions
|
|
@ -123,7 +123,7 @@ class NcursesDisplay(object):
|
|||
# pylint: disable=star-args
|
||||
code, index = self.dialog.menu(message, **menu_options)
|
||||
|
||||
if code == CANCEL:
|
||||
if code == CANCEL or index == "":
|
||||
return code, -1
|
||||
|
||||
return code, int(index) - 1
|
||||
|
|
|
|||
Loading…
Reference in a new issue