diff options
author | Helmut Grohne <helmut@subdivi.de> | 2013-02-02 01:22:42 +0100 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2013-02-02 01:22:42 +0100 |
commit | d39de5f1320f07b243654af79cf4958662e30467 (patch) | |
tree | 2debc18be8e80ebeada62bca2654fcca8ca98058 /tcvt.py | |
parent | d99d1a5d6a3a6489cbfe0d286bedbb0762bd9cd1 (diff) | |
download | tcvt-d39de5f1320f07b243654af79cf4958662e30467.tar.gz |
swallow exceptions for unknown keys
Most often this feature comes at an inconvenient time. If a key turns
out dysfunctional, export TCVT_DEVEL=1 to see the value of the key.
Diffstat (limited to 'tcvt.py')
-rwxr-xr-x | tcvt.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -518,7 +518,8 @@ def main(): elif key <= 0xff: os.write(masterfd, chr(key)) else: - raise ValueError("getch returned %d" % key) + if "TCVT_DEVEL" in os.environ: + raise ValueError("getch returned %d" % key) elif masterfd in res: try: data = os.read(masterfd, 1024) |