Catched keyboardInterrupt exception in mainLoop

This commit is contained in:
Manuel Cortez 2017-02-04 23:03:34 -06:00
parent 249f6e03c2
commit 22ab73be26

View File

@ -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: