mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	Issue #5622: Fix curses.wrapper to raise correct exception if curses
initialization fails.
This commit is contained in:
		
							parent
							
								
									c8ab6eeb01
								
							
						
					
					
						commit
						d2853180df
					
				
					 2 changed files with 8 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -43,6 +43,7 @@ def wrapper(func, *args, **kwds):
 | 
			
		|||
        return func(stdscr, *args, **kwds)
 | 
			
		||||
    finally:
 | 
			
		||||
        # Set everything back to normal
 | 
			
		||||
        if 'stdscr' in locals():
 | 
			
		||||
            stdscr.keypad(0)
 | 
			
		||||
            curses.echo()
 | 
			
		||||
            curses.nocbreak()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,6 +37,9 @@ Core and Builtins
 | 
			
		|||
Library
 | 
			
		||||
-------
 | 
			
		||||
 | 
			
		||||
- Issue #5622: Fix curses.wrapper to raise correct exception if curses
 | 
			
		||||
  initialization fails.
 | 
			
		||||
 | 
			
		||||
- Issue #11391: Writing to a mmap object created with
 | 
			
		||||
  ``mmap.PROT_READ|mmap.PROT_EXEC`` would segfault instead of raising a
 | 
			
		||||
  TypeError.  Patch by Charles-François Natali.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue