diff options
author | Helmut Grohne <helmut@subdivi.de> | 2013-06-02 12:44:27 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2013-06-02 12:44:27 +0200 |
commit | f8ce3d2a2075957ed6047c67db5aa190d7c30aa8 (patch) | |
tree | 8a76d889668a7fca6908f3e1d2d889473747d583 | |
parent | d2a2ac19430c0ce809fbe514be721b0565fbbcf3 (diff) | |
download | tcvt-f8ce3d2a2075957ed6047c67db5aa190d7c30aa8.tar.gz |
support not crashing on unsupported sequences
-rwxr-xr-x | tcvt.py | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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: |