Fix a traceback when the terminal is not behaving as it should
This commit is contained in:
parent
545ad1bd71
commit
076b899b45
1 changed files with 2 additions and 0 deletions
|
@ -115,6 +115,8 @@ class Keyboard(object):
|
|||
# Disable the timeout
|
||||
s.timeout(-1)
|
||||
ret_list = get_char_list(s)
|
||||
if not ret_list:
|
||||
return ret_list
|
||||
if len(ret_list) != 1:
|
||||
if ret_list[-1] == '^M':
|
||||
ret_list.pop(-1)
|
||||
|
|
Loading…
Reference in a new issue