Skip to content

Commit 2701558

Browse files
committed
Drop py_user_proc from the users systemd version
Signed-off-by: Alberto Planas <[email protected]>
1 parent 2dd2eda commit 2701558

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

psutil/arch/linux/users.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ psutil_users_systemd(PyObject *self, PyObject *args) {
7373
PyObject *py_username = NULL;
7474
PyObject *py_tty = NULL;
7575
PyObject *py_hostname = NULL;
76-
PyObject *py_user_proc = NULL;
7776
double tstamp = 0.0;
7877
pid_t pid = 0;
7978
int sessions;
@@ -96,8 +95,6 @@ psutil_users_systemd(PyObject *self, PyObject *args) {
9695
for (int i = 0; i < sessions; i++) {
9796
session_id = sessions_list[i];
9897
py_tuple = NULL;
99-
py_user_proc = NULL;
100-
py_user_proc = Py_True;
10198

10299
username = NULL;
103100
if (sd_session_get_username(session_id, &username) < 0)
@@ -135,12 +132,11 @@ psutil_users_systemd(PyObject *self, PyObject *args) {
135132
goto error;
136133

137134
py_tuple = Py_BuildValue(
138-
"OOOdO" _Py_PARSE_PID,
135+
"OOOd" _Py_PARSE_PID,
139136
py_username, // username
140137
py_tty, // tty
141138
py_hostname, // hostname
142139
tstamp, // tstamp
143-
py_user_proc, // (bool) user process
144140
pid // process id
145141
);
146142
if (! py_tuple)

0 commit comments

Comments
 (0)