Catched keyboardInterrupt exception in mainLoop
This commit is contained in:
		| @@ -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: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user