@@ -188,12 +188,17 @@ def template_reset(self):
188188 self .__replyAck = - 1
189189
190190 def template_deinit (self ):
191- topic_list = []
192- topic_list .append (self .__topic .template_property_topic_sub )
193- topic_list .append (self .__topic .template_event_topic_sub )
194- topic_list .append (self .__topic .template_action_topic_sub )
195- topic_list .append (self .__topic .template_service_topic_sub )
196- return self .__hub .unsubscribe (topic_list )
191+ # topic_list = []
192+ # topic_list.append(self.__topic.template_property_topic_sub)
193+ # topic_list.append(self.__topic.template_event_topic_sub)
194+ # topic_list.append(self.__topic.template_action_topic_sub)
195+ # topic_list.append(self.__topic.template_service_topic_sub)
196+ # return self.__hub.unsubscribe(topic_list)
197+
198+ self .__hub .unsubscribe (self .__topic .template_property_topic_sub )
199+ self .__hub .unsubscribe (self .__topic .template_event_topic_sub )
200+ self .__hub .unsubscribe (self .__topic .template_action_topic_sub )
201+ return self .__hub .unsubscribe (self .__topic .template_service_topic_sub )
197202
198203 def template_init (self , callback , peopery_cb , action_cb , event_cb , service_cb ):
199204 property_topic = self .__topic .template_property_topic_sub
@@ -213,13 +218,6 @@ def template_init(self, callback, peopery_cb, action_cb, event_cb, service_cb):
213218
214219 self .__hub .register_explorer_callback (topic_list , callback )
215220
216- # topic_list.clear()
217- # topic_list.append((service_topic, 0))
218- # topic_list.append((property_topic, 0))
219- # topic_list.append((action_topic, 0))
220- # topic_list.append((event_topic, 0))
221- # return self.__hub.subscribe(topic_list, 0)
222-
223221 self .__hub .subscribe (property_topic , 0 )
224222 self .__hub .subscribe (action_topic , 0 )
225223 self .__hub .subscribe (event_topic , 0 )
0 commit comments