From c9ed894940305b588ffdbcb8d3dbef2798b7cb82 Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Sun, 17 Feb 2019 10:02:09 -0800 Subject: add logic to support windows XP --- psutil/_psutil_windows.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/psutil/_psutil_windows.c b/psutil/_psutil_windows.c index 30bd96cb..b5b5a8f5 100644 --- a/psutil/_psutil_windows.c +++ b/psutil/_psutil_windows.c @@ -788,7 +788,7 @@ psutil_proc_exe(PyObject *self, PyObject *args) { #else // Windows XP if (GetProcessImageFileNameW(hProcess, exe, MAX_PATH) == 0) { // see: https://github.com/giampaolo/psutil/issues/1394 - if (GetLastError() == 0) { + if (GetLastError() == 0) PyErr_SetFromWindowsErr(ERROR_ACCESS_DENIED); else PyErr_SetFromWindowsErr(0); -- cgit v1.2.1