summaryrefslogtreecommitdiff
path: root/tcvt.py
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2013-06-02 12:44:27 +0200
committerHelmut Grohne <helmut@subdivi.de>2013-06-02 12:44:27 +0200
commitf8ce3d2a2075957ed6047c67db5aa190d7c30aa8 (patch)
tree8a76d889668a7fca6908f3e1d2d889473747d583 /tcvt.py
parentd2a2ac19430c0ce809fbe514be721b0565fbbcf3 (diff)
downloadtcvt-f8ce3d2a2075957ed6047c67db5aa190d7c30aa8.tar.gz
support not crashing on unsupported sequences
Diffstat (limited to 'tcvt.py')
-rwxr-xr-xtcvt.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tcvt.py b/tcvt.py
index 9fc70f0..e113c07 100755
--- a/tcvt.py
+++ b/tcvt.py
@@ -588,7 +588,13 @@ def main():
if not data:
break
for char in data:
- t.feed(char)
+ if "TCVT_DEVEL" in os.environ:
+ t.feed(char)
+ else:
+ try:
+ t.feed(char)
+ except ValueError:
+ t.feed_reset()
if refreshpending is None:
refreshpending = time.time() + 0.1
elif refreshpending is not None: