diff options
author | Daniel Beer <dbeer1@bloomberg.net> | 2019-04-02 10:28:49 -0400 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2019-04-02 16:28:49 +0200 |
commit | e91c041d84aa34790ebd6396dcbbc2e3391b0a73 (patch) | |
tree | 1a06272b4dbbc6f38415f8f8ac4894b6c7004df4 | |
parent | 9691d791d7a00c7e4055156545941f4ccfa2ee12 (diff) | |
download | psutil-e91c041d84aa34790ebd6396dcbbc2e3391b0a73.tar.gz |
Fix spurious exception when iterating processes on Solaris (#1471)
-rw-r--r-- | psutil/_psutil_sunos.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/psutil/_psutil_sunos.c b/psutil/_psutil_sunos.c index 99423f7a..49100ec6 100644 --- a/psutil/_psutil_sunos.c +++ b/psutil/_psutil_sunos.c @@ -218,8 +218,10 @@ psutil_proc_name_and_args(PyObject *self, PyObject *args) { /* If we can't read process memory or can't decode the result * then return args from /proc. */ - if (!py_args) + if (!py_args) { + PyErr_Clear(); py_args = PyUnicode_DecodeFSDefault(info.pr_psargs); + } /* Both methods has been failed. */ if (!py_args) |