diff options
author | mathieui <mathieui@mathieui.net> | 2014-10-14 16:16:11 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2014-10-14 16:16:11 +0200 |
commit | 076b899b459925f9e5b9ee68adc507183f2cbe2f (patch) | |
tree | 0fd55e7ad95047d038c643a0f2d90b85c0e7a7d3 /src/keyboard.py | |
parent | 545ad1bd71e87a482b357f5b49a0898be73478d8 (diff) | |
download | poezio-076b899b459925f9e5b9ee68adc507183f2cbe2f.tar.gz poezio-076b899b459925f9e5b9ee68adc507183f2cbe2f.tar.bz2 poezio-076b899b459925f9e5b9ee68adc507183f2cbe2f.tar.xz poezio-076b899b459925f9e5b9ee68adc507183f2cbe2f.zip |
Fix a traceback when the terminal is not behaving as it should
Diffstat (limited to 'src/keyboard.py')
-rwxr-xr-x | src/keyboard.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/keyboard.py b/src/keyboard.py index 3a8f3537..ec1e7d0a 100755 --- a/src/keyboard.py +++ b/src/keyboard.py @@ -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) |