From 33fea55c3e89a38e668675ed3971c923e81fafc3 Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Sat, 18 Jan 2020 14:43:23 +0100 Subject: set proper NTSTATUS error code --- psutil/arch/windows/process_handles.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/psutil/arch/windows/process_handles.c b/psutil/arch/windows/process_handles.c index e5dd74a8..f63d4af3 100644 --- a/psutil/arch/windows/process_handles.c +++ b/psutil/arch/windows/process_handles.c @@ -130,7 +130,7 @@ psutil_get_filename(LPVOID lpvParam) { } while (--attempts); if (! NT_SUCCESS(status)) { - PyErr_SetFromOSErrnoWithSyscall("NtQuerySystemInformation"); + psutil_SetFromNTStatusErr(status, "NtQuerySystemInformation"); FREE(globalFileName); globalFileName = NULL; return 1; -- cgit v1.2.1