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