Commit 719ee5d7 authored by Robin Obůrka's avatar Robin Obůrka Committed by Robin Obůrka

msgloop: Check availability of sockets

parent 2dc95357
......@@ -29,6 +29,8 @@ def sn_main(box_name, setup=None, process=None, teardown=None, argparser=None):
ctx = sn.SN(zmq.Context.instance(), argparser or sn.get_arg_parser())
socket_recv, socket_send = detect_and_get_sockets(ctx)
if not socket_recv and not socket_send:
raise sn.LoopError("Neither input nor output socket provided")
if teardown and not setup:
raise sn.LoopError("There is teardown callback without setup")
if not process:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment