summaryrefslogtreecommitdiff
path: root/tcvt.py
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2013-02-02 01:22:42 +0100
committerHelmut Grohne <helmut@subdivi.de>2013-02-02 01:22:42 +0100
commitd39de5f1320f07b243654af79cf4958662e30467 (patch)
tree2debc18be8e80ebeada62bca2654fcca8ca98058 /tcvt.py
parentd99d1a5d6a3a6489cbfe0d286bedbb0762bd9cd1 (diff)
downloadtcvt-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-xtcvt.py3
1 files changed, 2 insertions, 1 deletions
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)