diff options
author | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2010-07-20 19:15:15 +0000 |
---|---|---|
committer | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2010-07-20 19:15:15 +0000 |
commit | 8b090f8d90f5ab58afc7dff88f196376fd59c8ab (patch) | |
tree | 788a69e57840702f6ed8308d3e07f28a5957db39 | |
parent | bb92c63a2c050ec9042327ba62ea5b9e06b45720 (diff) | |
download | poezio-8b090f8d90f5ab58afc7dff88f196376fd59c8ab.tar.gz poezio-8b090f8d90f5ab58afc7dff88f196376fd59c8ab.tar.bz2 poezio-8b090f8d90f5ab58afc7dff88f196376fd59c8ab.tar.xz poezio-8b090f8d90f5ab58afc7dff88f196376fd59c8ab.zip |
Should fix a crash on resize
-rw-r--r-- | src/keyboard.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/keyboard.py b/src/keyboard.py index 1344035f..b27ed5f5 100644 --- a/src/keyboard.py +++ b/src/keyboard.py @@ -28,7 +28,10 @@ def get_next_byte(s): """ Read the next byte of the utf-8 char """ - c = s.getkey() + try: + c = s.getkey() + except: + return "KEY_RESIZE" if len(c) > 4: return (None, c) return (ord(c), c) |