diff --git a/bink.py b/bink.py index eb77193..fce08b3 100755 --- a/bink.py +++ b/bink.py @@ -129,9 +129,6 @@ class App(): self.update() self.loop.start() - def terminate(self): - raise InterruptedError - class ActionBox(urwid.ListBox): def keypress(self, size, key): keyl = key.lower() @@ -140,7 +137,7 @@ class ActionBox(urwid.ListBox): elif keyl == "r": app.update() elif keyl in ("q", "x"): - app.terminate() + raise urwid.ExitMainLoop elif keyl == " ": super().keypress(size, "page down") elif keyl in ("j", "n", "ctrl n"): @@ -166,7 +163,7 @@ class ActionBox(urwid.ListBox): app = App() try: app.loop.run() -except (KeyboardInterrupt, InterruptedError): +except (KeyboardInterrupt, urwid.ExitMainLoop): app.loop.stop() call("clear", shell=True) print("bye!")