host/viewer: Now runs at all, and does not exit on timeout

This commit is contained in:
jaseg 2016-01-03 21:45:33 +01:00
parent 50b0fc8b00
commit 7d18060a58

View file

@ -2,6 +2,7 @@
import argparse import argparse
import atexit import atexit
from contextlib import suppress
import bdf import bdf
import crap import crap
@ -18,7 +19,8 @@ if __name__ == '__main__':
udp_server = crap.CRAPServer(args.addr, args.port, blocking=True, log=lambda *_a: None) udp_server = crap.CRAPServer(args.addr, args.port, blocking=True, log=lambda *_a: None)
with suppress(KeyboardInterrupt): with suppress(KeyboardInterrupt):
for _title, frame in udp_server: while True:
bdf.printframe(frame) for _title, frame in udp_server:
bdf.printframe(frame)
udp_server.close() udp_server.close()