summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2020-01-11 10:49:39 -0800
committerGiampaolo Rodola <g.rodola@gmail.com>2020-01-11 10:49:39 -0800
commit0b21b19fb2ef008d3cdb9a82e494b1a024a5c14b (patch)
tree1e5877a759d3618adc2d4cace7ba744534ff1edb
parent4526fb11f18f361f4afc11484c768875e69de1a4 (diff)
downloadpsutil-0b21b19fb2ef008d3cdb9a82e494b1a024a5c14b.tar.gz
#1652 remove Windows Vista references
-rw-r--r--psutil/__init__.py2
-rw-r--r--psutil/_psutil_windows.c5
2 files changed, 2 insertions, 5 deletions
diff --git a/psutil/__init__.py b/psutil/__init__.py
index d33d55e8..ffeead87 100644
--- a/psutil/__init__.py
+++ b/psutil/__init__.py
@@ -775,7 +775,7 @@ class Process(object):
"""
return self._proc.io_counters()
- # Linux and Windows >= Vista only
+ # Linux and Windows
if hasattr(_psplatform.Process, "ionice_get"):
def ionice(self, ioclass=None, value=None):
diff --git a/psutil/_psutil_windows.c b/psutil/_psutil_windows.c
index d5928d72..d11dbdc7 100644
--- a/psutil/_psutil_windows.c
+++ b/psutil/_psutil_windows.c
@@ -456,14 +456,11 @@ psutil_proc_exe(PyObject *self, PyObject *args) {
if (! PyArg_ParseTuple(args, "l", &pid))
return NULL;
+
hProcess = psutil_handle_from_pid(pid, PROCESS_QUERY_LIMITED_INFORMATION);
if (NULL == hProcess)
return NULL;
- // Here we differentiate between XP and Vista+ because
- // QueryFullProcessImageNameW is better than GetProcessImageFileNameW
- // (avoid using QueryDosDevice on the returned path), see:
- // https://github.com/giampaolo/psutil/issues/1394
memset(exe, 0, MAX_PATH);
if (QueryFullProcessImageNameW(hProcess, 0, exe, &size) == 0) {
PyErr_SetFromOSErrnoWithSyscall("QueryFullProcessImageNameW");