mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	mod from Joe Strout: when quitting, catch errors in window.close() methods and ignore them. Otherwise one can never quit.
This commit is contained in:
		
							parent
							
								
									8746082175
								
							
						
					
					
						commit
						d58c7464d9
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
					@ -228,7 +228,10 @@ class PythonIDE(Wapplication.Application):
 | 
				
			||||||
		PyConsole.output.writeprefs()
 | 
							PyConsole.output.writeprefs()
 | 
				
			||||||
		PyEdit.searchengine.writeprefs()
 | 
							PyEdit.searchengine.writeprefs()
 | 
				
			||||||
		for window in self._windows.values():
 | 
							for window in self._windows.values():
 | 
				
			||||||
			rv = window.close()
 | 
								try:
 | 
				
			||||||
 | 
									rv = window.close() # ignore any errors while quitting
 | 
				
			||||||
 | 
								except:
 | 
				
			||||||
 | 
									rv = 0   # (otherwise, we can get stuck!)
 | 
				
			||||||
			if rv and rv > 0:
 | 
								if rv and rv > 0:
 | 
				
			||||||
				return
 | 
									return
 | 
				
			||||||
		self.quitting = 1
 | 
							self.quitting = 1
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue