This commit is contained in:
nebula 2025-04-24 05:25:05 +00:00
parent 0b8e77cc15
commit e9951989f9

View File

@ -130,7 +130,7 @@ class App():
self.loop.start()
def terminate(self):
raise urwid.ExitMainLoop
raise InterruptedError
class ActionBox(urwid.ListBox):
def keypress(self, size, key):
@ -166,7 +166,7 @@ class ActionBox(urwid.ListBox):
app = App()
try:
app.loop.run()
except (KeyboardInterrupt, urwid.ExitMainLoop):
except (KeyboardInterrupt, InterruptedError):
app.loop.stop()
call("clear", shell=True)
print("bye!")