From e5d0aca1f467bea004becf0c2f2785c49badc459 Mon Sep 17 00:00:00 2001 From: lunar-mining Date: Sun, 29 Oct 2023 08:02:39 +0100 Subject: [PATCH] dnet: fix bug which caused dnet to crash on receiving unhandled mouse input --- bin/dnet/main.py | 2 ++ bin/dnet/view.py | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/dnet/main.py b/bin/dnet/main.py index b687faa55..e9201b109 100644 --- a/bin/dnet/main.py +++ b/bin/dnet/main.py @@ -106,6 +106,8 @@ class Dnetview: loop.run() def unhandled_input(self, key): + if isinstance(key, tuple): + return if key in ('q'): for task in asyncio.all_tasks(): task.cancel() diff --git a/bin/dnet/view.py b/bin/dnet/view.py index 1b546d366..2b40c8d69 100644 --- a/bin/dnet/view.py +++ b/bin/dnet/view.py @@ -38,8 +38,6 @@ class NodeView(urwid.WidgetWrap): return True def keypress(self, size, key): - #if key in ('q'): - # raise urwid.ExitMainLoop() return key def update_w(self):