Catched keyboardInterrupt exception in mainLoop
This commit is contained in:
parent
249f6e03c2
commit
22ab73be26
@ -63,6 +63,7 @@ class Window(object):
|
||||
self.screen.refresh()
|
||||
|
||||
def run(self):
|
||||
try:
|
||||
while 1:
|
||||
time.sleep(0.01)
|
||||
if self.status_counter != None:
|
||||
@ -77,6 +78,8 @@ class Window(object):
|
||||
if handler.handleKey(c):
|
||||
self.check_changes(handler)
|
||||
break
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
|
||||
def check_changes(self, handler):
|
||||
if hasattr(handler, "selected_action") and handler.done == 1:
|
||||
|
Loading…
Reference in New Issue
Block a user