remove unused handler
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Max Erenberg 2021-09-08 22:28:29 +00:00
parent 6e2b9dee24
commit cb6243c3e2
1 changed files with 2 additions and 11 deletions

View File

@ -1,7 +1,6 @@
import sys import sys
from asciimatics.event import KeyboardEvent from asciimatics.exceptions import ResizeScreenError
from asciimatics.exceptions import ResizeScreenError, StopApplication
from asciimatics.scene import Scene from asciimatics.scene import Scene
from asciimatics.screen import Screen from asciimatics.screen import Screen
@ -26,14 +25,6 @@ from .members.ResetPasswordResultView import ResetPasswordResultView
from .members.SetForwardingAddressesView import SetForwardingAddressesView from .members.SetForwardingAddressesView import SetForwardingAddressesView
def unhandled(event):
if isinstance(event, KeyboardEvent):
c = event.key_code
# Stop on 'q' or 'Esc'
if c in (113, 27):
raise StopApplication("User terminated app")
# tuples of (name, view) # tuples of (name, view)
views = [] views = []
@ -73,7 +64,7 @@ def screen_wrapper(screen, last_scene, model):
model.views = [view for name, view in views] model.views = [view for name, view in views]
screen.play( screen.play(
scenes, stop_on_resize=True, start_scene=last_scene, allow_int=True, scenes, stop_on_resize=True, start_scene=last_scene, allow_int=True,
unhandled_input=unhandled) )
def main(): def main():