We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46e8f7a commit d427475Copy full SHA for d427475
1 file changed
Lib/test/libregrtest/utils.py
@@ -784,8 +784,11 @@ def _get_process_memory_usage_linux(pid: int) -> int | None:
784
785
def _get_process_memory_usage_windows(pid: int) -> int | None:
786
assert _winapi is not None # to make mypy happy
787
- handle = _winapi.OpenProcess(_winapi.PROCESS_QUERY_LIMITED_INFORMATION,
788
- False, pid)
+ try:
+ handle = _winapi.OpenProcess(_winapi.PROCESS_QUERY_LIMITED_INFORMATION,
789
+ False, pid)
790
+ except OSError:
791
+ return None
792
try:
793
mem_info = _winapi.GetProcessMemoryInfo(handle)
794
finally:
0 commit comments