(code)
| 477 | |
| 478 | _WINERROR_BY_VALUE = None |
| 479 | def winerror(code): |
| 480 | global _WINERROR_BY_VALUE |
| 481 | if not _WINERROR_BY_VALUE: # Lazy init |
| 482 | _WINERROR_BY_VALUE = gdef.FlagMapper(*(getattr(gdef, error) for error in gdef.meta.errors)) |
| 483 | val = _WINERROR_BY_VALUE[code] |
| 484 | if val is code: # Not found |
| 485 | val = _WINERROR_BY_VALUE[code & 0xffff] # Hresult: extract code (https://en.wikipedia.org/wiki/HRESULT) |
| 486 | return val |
| 487 | |
| 488 | |
| 489 |
nothing calls this directly
no outgoing calls
no test coverage detected