i am so frustrated!
This commit is contained in:
parent
e9951989f9
commit
ac232008e8
7
bink.py
7
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!")
|
||||
|
Loading…
x
Reference in New Issue
Block a user