mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	Catch exceptions in final self.destroy() call.
This commit is contained in:
		
							parent
							
								
									bd24eb447e
								
							
						
					
					
						commit
						bd8341eeeb
					
				
					 1 changed files with 5 additions and 2 deletions
				
			
		|  | @ -55,8 +55,11 @@ def run(self): | ||||||
| 		try: | 		try: | ||||||
| 			while 1: | 			while 1: | ||||||
| 				self.random_move(self.n) | 				self.random_move(self.n) | ||||||
| 		finally: | 		except TclError: | ||||||
|  | 			try: | ||||||
| 				self.tk.destroy() | 				self.tk.destroy() | ||||||
|  | 			except TclError: | ||||||
|  | 				pass | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| # Main program | # Main program | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Guido van Rossum
						Guido van Rossum