소스 검색

dnet: fix bug which caused dnet to crash on receiving unhandled mouse input

lunar-mining 2 년 전
부모
커밋
e5d0aca1f4
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 0
      bin/dnet/main.py
  2. 0 2
      bin/dnet/view.py

+ 2 - 0
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()

+ 0 - 2
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):