From 585cd35e48b0c357f5d8b5b62e05f9721cf1bda8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A1lint=20Bokros?= Date: Thu, 25 Jan 2018 17:04:34 +0100 Subject: [PATCH] Store all initial subscriptions --- src/event_handlers/event_handler_base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/event_handlers/event_handler_base.py b/src/event_handlers/event_handler_base.py index 6260028..63e7919 100644 --- a/src/event_handlers/event_handler_base.py +++ b/src/event_handlers/event_handler_base.py @@ -7,9 +7,9 @@ class EventHandlerBase: def __init__(self, anchor): self.messaging = Messaging() self.anchor = anchor - self.messaging.subscribe(self.anchor) - self.messaging.subscribe('reset') - self.subscriptions = {self.anchor} + self.subscriptions = set() + self.subscribe(self.anchor) + self.subscribe('reset') self.messaging.register_callback(self.event_handler_callback) def event_handler_callback(self, msg_parts):