trainer: fix for ctrl-c in --no-preview mode

This commit is contained in:
iperov 2019-04-05 21:50:46 +04:00
parent fe40a46933
commit cfae9f9fd8

View file

@ -185,7 +185,10 @@ def main(args, device_args):
op = input.get('op','')
if op == 'close':
break
io.process_messages(0.1)
try:
io.process_messages(0.1)
except KeyboardInterrupt:
s2c.put ( {'op': 'close'} )
else:
wnd_name = "Training preview"
io.named_window(wnd_name)