summaryrefslogtreecommitdiff
path: root/psutil/_psutil_bsd.c
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2019-02-24 09:55:52 -0800
committerGitHub <noreply@github.com>2019-02-24 09:55:52 -0800
commit7a2572268168e96c8841ca83ab1a89735ec02c3a (patch)
tree656a58683c5c48308152b302f1a31c4c82e74106 /psutil/_psutil_bsd.c
parent88beee9e0d169e979a3027bf9e61c59ccc1ad6e3 (diff)
downloadpsutil-7a2572268168e96c8841ca83ab1a89735ec02c3a.tar.gz
#1428 in case of error, show the C syscall which caused it
Diffstat (limited to 'psutil/_psutil_bsd.c')
-rw-r--r--psutil/_psutil_bsd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/psutil/_psutil_bsd.c b/psutil/_psutil_bsd.c
index dce157f5..073ff02d 100644
--- a/psutil/_psutil_bsd.c
+++ b/psutil/_psutil_bsd.c
@@ -804,7 +804,7 @@ psutil_users(PyObject *self, PyObject *args) {
fp = fopen(_PATH_UTMP, "r");
if (fp == NULL) {
- PyErr_SetFromErrno(PyExc_OSError);
+ PyErr_SetFromErrnoWithFilename(PyExc_OSError, _PATH_UTMP);
goto error;
}