From 5891a637b951da76447c95269c7b9b44be78e3f3 Mon Sep 17 00:00:00 2001 From: nebula Date: Wed, 23 Apr 2025 23:03:45 +0000 Subject: [PATCH] i really should be testing this on my local machine :) --- bink.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bink.py b/bink.py index da6a883..dcb53fe 100755 --- a/bink.py +++ b/bink.py @@ -126,6 +126,10 @@ class App(): self.update() self.loop.start() + def terminate(): + raise urwid.ExitMainLoop + exit(0) + class ActionBox(urwid.ListBox): def keypress(self, size, key): keyl = key.lower() @@ -134,7 +138,7 @@ class ActionBox(urwid.ListBox): elif keyl == "r": app.update() elif keyl in ("q", "x"): - exit(0) + app.exit() elif keyl == " ": super().keypress(size, "page down") elif keyl in ("j", "n", "ctrl n"): @@ -161,4 +165,4 @@ app = App() try: app.loop.run() except KeyboardInterrupt: - exit(0) + app.exit()