Skip to content

Commit a9b9472

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

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
@@ -63,7 +63,6 @@ psutil_users_systemd(PyObject *self, PyObject *args) {
6363
PyObject *py_username = NULL;
6464
PyObject *py_tty = NULL;
6565
PyObject *py_hostname = NULL;
66-
PyObject *py_user_proc = NULL;
6766
double tstamp = 0.0;
6867
pid_t pid = 0;
6968
int sessions;
@@ -86,8 +85,6 @@ psutil_users_systemd(PyObject *self, PyObject *args) {
8685
for (int i = 0; i < sessions; i++) {
8786
session_id = sessions_list[i];
8887
py_tuple = NULL;
89-
py_user_proc = NULL;
90-
py_user_proc = Py_True;
9188

9289
username = NULL;
9390
if (sd_session_get_username(session_id, &username) < 0)
@@ -125,12 +122,11 @@ psutil_users_systemd(PyObject *self, PyObject *args) {
125122
goto error;
126123

127124
py_tuple = Py_BuildValue(
128-
"OOOdO" _Py_PARSE_PID,
125+
"OOOd" _Py_PARSE_PID,
129126
py_username, // username
130127
py_tty, // tty
131128
py_hostname, // hostname
132129
tstamp, // tstamp
133-
py_user_proc, // (bool) user process
134130
pid // process id
135131
);
136132
if (! py_tuple)

0 commit comments

Comments
 (0)