Commit 87d1c3bb authored by Robin Obůrka's avatar Robin Obůrka

msgloop: Do not check generator in check_configuration

It is a little bit unexpected that right implementation is checked in
something with name "configuration".
parent 1e38b30a
...@@ -311,8 +311,8 @@ class SNGeneratorBox(SNBox): ...@@ -311,8 +311,8 @@ class SNGeneratorBox(SNBox):
super().__init__(box_name, argparser) super().__init__(box_name, argparser)
self.socket_send = self.get_socket("out") self.socket_send = self.get_socket("out")
# Ensure about process() method before try to get iterator if not inspect.isgeneratorfunction(self.process):
self.check_configuration() raise SetupError("Generator is expected for output-only box")
self.process_iterator = self.process() self.process_iterator = self.process()
...@@ -320,8 +320,6 @@ class SNGeneratorBox(SNBox): ...@@ -320,8 +320,6 @@ class SNGeneratorBox(SNBox):
"""Check *out* resource and check if :meth:`process` is a generator.""" """Check *out* resource and check if :meth:`process` is a generator."""
if not self.socket_send: if not self.socket_send:
raise SetupError("Output socket wasn't provided") raise SetupError("Output socket wasn't provided")
if not inspect.isgeneratorfunction(self.process):
raise SetupError("Generator is expected for output-only box")
def teardown_box(self): def teardown_box(self):
"""Explicitly closes *out* socket and calls method of ancestor.""" """Explicitly closes *out* socket and calls method of ancestor."""
......
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