From d39de5f1320f07b243654af79cf4958662e30467 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Sat, 2 Feb 2013 01:22:42 +0100 Subject: 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. --- tcvt.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tcvt.py b/tcvt.py index 81572b0..b3ea5c6 100755 --- a/tcvt.py +++ b/tcvt.py @@ -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) -- cgit v1.2.3