From 1eacc379c335716f5f9e40ec6c983a4797e8730f Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 15 Jul 2021 22:46:44 -0700 Subject: [PATCH] bugfix --- kivyblocks/udp_widget.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kivyblocks/udp_widget.py b/kivyblocks/udp_widget.py index a2fa45a..9b8398b 100644 --- a/kivyblocks/udp_widget.py +++ b/kivyblocks/udp_widget.py @@ -27,8 +27,10 @@ class UdpWidget(EventDispatcher): } for cmd in self.commands: evt_name = 'on_%s' % cmd - setattr(self, evt_name, self.event_handler) + setattr(self, evt_name, self.my_event_handler) self.register_event_type(evt_name) + print('udp_widget.py:register', evt_name, self.my_event_handler) + self.get_peer_pubkey() Clock.schedule_once(self.get_peer_pubkey_loop, 2) @@ -93,9 +95,10 @@ class UdpWidget(EventDispatcher): 'd': d, 'addr': addr } + print('udp_widget.py dispatch', evt_name, evt_data) self.dispatch(evt_name, evt_data) - def event_handler(self, o, d): + def my_event_handler(self, o, d): Logger.info('UdpWidget: received data=%s', d) def set_pubkey(self, data, addr):