Remove gratuitous None-check

This commit is contained in:
Bálint Bokros 2017-12-05 17:52:25 +01:00
parent 26ef730569
commit 6f16a335db

View File

@ -25,8 +25,6 @@ class StatefulEventHandler(EventHandlerBase):
if self.generator is None: if self.generator is None:
self.generator = self.event_handler_function(data_json, self) self.generator = self.event_handler_function(data_json, self)
response_anchor, response_data = next(self.generator) response_anchor, response_data = next(self.generator)
if response_anchor is None:
return
if response_anchor not in self.subscriptions: if response_anchor not in self.subscriptions:
self.subscriptions.add(response_anchor) self.subscriptions.add(response_anchor)
self.zmq_sub_socket.setsockopt_string(zmq.SUBSCRIBE, response_anchor) self.zmq_sub_socket.setsockopt_string(zmq.SUBSCRIBE, response_anchor)