diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2017-11-24 14:07:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-24 14:07:06 +0100 |
commit | 34fb3666859bda349afdc9b4397b0b7a715f08de (patch) | |
tree | 74ff50536fd2275efc945b4329482acc938d45e1 /psutil/_psutil_osx.c | |
parent | 71c4f5683460e110693c976b21b06ab4034ae8a3 (diff) | |
download | psutil-34fb3666859bda349afdc9b4397b0b7a715f08de.tar.gz |
Arguments for NoSuchProcess and AccessDenied for the C ext (#1180)
* change NoSuchProcess and AccessDenied C exceptions signatures
* fix arg call on win
Diffstat (limited to 'psutil/_psutil_osx.c')
-rw-r--r-- | psutil/_psutil_osx.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/psutil/_psutil_osx.c b/psutil/_psutil_osx.c index 6c520e5d..fef61ca8 100644 --- a/psutil/_psutil_osx.c +++ b/psutil/_psutil_osx.c @@ -266,7 +266,7 @@ psutil_proc_exe(PyObject *self, PyObject *args) { ret = proc_pidpath((pid_t)pid, &buf, sizeof(buf)); if (ret == 0) { if (pid == 0) - AccessDenied(); + AccessDenied(""); else psutil_raise_for_pid(pid, "proc_pidpath()"); return NULL; @@ -571,9 +571,9 @@ psutil_proc_memory_uss(PyObject *self, PyObject *args) { err = task_for_pid(mach_task_self(), (pid_t)pid, &task); if (err != KERN_SUCCESS) { if (psutil_pid_exists(pid) == 0) - NoSuchProcess(); + NoSuchProcess(""); else - AccessDenied(); + AccessDenied(""); return NULL; } @@ -1018,9 +1018,9 @@ psutil_proc_threads(PyObject *self, PyObject *args) { err = task_for_pid(mach_task_self(), (pid_t)pid, &task); if (err != KERN_SUCCESS) { if (psutil_pid_exists(pid) == 0) - NoSuchProcess(); + NoSuchProcess(""); else - AccessDenied(); + AccessDenied(""); goto error; } @@ -1030,7 +1030,7 @@ psutil_proc_threads(PyObject *self, PyObject *args) { if (err != KERN_SUCCESS) { // errcode 4 is "invalid argument" (access denied) if (err == 4) { - AccessDenied(); + AccessDenied(""); } else { // otherwise throw a runtime error with appropriate error code |