Skip to content

Commit

Permalink
Fix spurious exception when iterating processes on Solaris (#1471)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbeer1 authored and giampaolo committed Apr 2, 2019
1 parent 9691d79 commit e91c041
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion psutil/_psutil_sunos.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e91c041

Please sign in to comment.