()
| 385 | return win32_edition() in ('IoTUAP', 'NanoServer', 'WindowsCoreHeadless', 'IoTEdgeOS') |
| 386 | |
| 387 | def win32_edition(): |
| 388 | try: |
| 389 | import winreg |
| 390 | except ImportError: |
| 391 | pass |
| 392 | else: |
| 393 | try: |
| 394 | cvkey = r'SOFTWARE\Microsoft\Windows NT\CurrentVersion' |
| 395 | with winreg.OpenKeyEx(winreg.HKEY_LOCAL_MACHINE, cvkey) as key: |
| 396 | return winreg.QueryValueEx(key, 'EditionId')[0] |
| 397 | except OSError: |
| 398 | pass |
| 399 | |
| 400 | return None |
| 401 | |
| 402 | def _win32_ver(version, csd, ptype): |
| 403 | # Try using WMI first, as this is the canonical source of data |
no test coverage detected
searching dependent graphs…