gh-133580: Add missing exception to _sys_getwindowsversion_from_kernel32 (GH-133574)

This commit is contained in:
Max Bachmann 2025-05-14 15:10:35 +02:00 committed by GitHub
parent b44c824856
commit 5d118d0a92
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View file

@ -1643,6 +1643,7 @@ static PyObject *
_sys_getwindowsversion_from_kernel32(void)
{
#ifndef MS_WINDOWS_DESKTOP
PyErr_SetString(PyExc_OSError, "cannot read version info on this platform");
return NULL;
#else
HANDLE hKernel32;