This commit is contained in:
Kovid Goyal 2020-09-10 11:57:41 +05:30
parent 229134cf31
commit e6839b45e3
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -108,7 +108,7 @@ def yesno(cli_opts: AskCLIOptions, items: List[str]) -> Response:
tty.setraw(sys.stdin.fileno()) tty.setraw(sys.stdin.fileno())
try: try:
response = sys.stdin.buffer.read(1) response = sys.stdin.buffer.read(1)
yes = response in (b'y', b'Y', b'\r', b'\n' b' ') yes = response in (b'y', b'Y', b'\r', b'\n', b' ')
return {'items': items, 'response': 'y' if yes else 'n'} return {'items': items, 'response': 'y' if yes else 'n'}
finally: finally:
sys.stdout.write(set_cursor_visible(True)) sys.stdout.write(set_cursor_visible(True))