aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjaseg <code@jaseg.net>2016-01-03 21:45:33 +0100
committerjaseg <code@jaseg.net>2016-01-03 21:45:33 +0100
commit7d18060a58b213e98ccc59ab16f6effc7faaa833 (patch)
tree7f52f3a96e22f619c2adc3e4247b88ed376a91a8
parent50b0fc8b00f51d851c67de49c1d56eb794cb59e9 (diff)
downloadmatelight-7d18060a58b213e98ccc59ab16f6effc7faaa833.tar.gz
matelight-7d18060a58b213e98ccc59ab16f6effc7faaa833.tar.bz2
matelight-7d18060a58b213e98ccc59ab16f6effc7faaa833.zip
host/viewer: Now runs at all, and does not exit on timeout
-rwxr-xr-xhost/viewer.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/host/viewer.py b/host/viewer.py
index 06a624a..9862961 100755
--- a/host/viewer.py
+++ b/host/viewer.py
@@ -2,6 +2,7 @@
import argparse
import atexit
+from contextlib import suppress
import bdf
import crap
@@ -18,7 +19,8 @@ if __name__ == '__main__':
udp_server = crap.CRAPServer(args.addr, args.port, blocking=True, log=lambda *_a: None)
with suppress(KeyboardInterrupt):
- for _title, frame in udp_server:
- bdf.printframe(frame)
+ while True:
+ for _title, frame in udp_server:
+ bdf.printframe(frame)
udp_server.close()