mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	gh-133580: Add missing exception to _sys_getwindowsversion_from_kernel32 (GH-133574)
This commit is contained in:
		
							parent
							
								
									b44c824856
								
							
						
					
					
						commit
						5d118d0a92
					
				
					 2 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
					@ -0,0 +1 @@
 | 
				
			||||||
 | 
					Fix :func:`sys.getwindowsversion` failing without setting an exception when called on some WinAPI partitions.
 | 
				
			||||||
| 
						 | 
					@ -1643,6 +1643,7 @@ static PyObject *
 | 
				
			||||||
_sys_getwindowsversion_from_kernel32(void)
 | 
					_sys_getwindowsversion_from_kernel32(void)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
#ifndef MS_WINDOWS_DESKTOP
 | 
					#ifndef MS_WINDOWS_DESKTOP
 | 
				
			||||||
 | 
					    PyErr_SetString(PyExc_OSError, "cannot read version info on this platform");
 | 
				
			||||||
    return NULL;
 | 
					    return NULL;
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
    HANDLE hKernel32;
 | 
					    HANDLE hKernel32;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue