aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2022-01-23 16:22:50 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2022-01-23 16:22:50 +0300
commitb1e487a7a819d92cbbe9233caa6d38cad23e5272 (patch)
tree38bb2dd2f2f5876491c322a39f77b44eead1b9ed
parenttop: run with -E/-e if supported (diff)
downloadlinux-status-b1e487a7a819d92cbbe9233caa6d38cad23e5272.tar.gz
linux-status-b1e487a7a819d92cbbe9233caa6d38cad23e5272.zip
app.py: fix loginctl output parsing
-rwxr-xr-xapp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/app.py b/app.py
index 1ae9760..36a705e 100755
--- a/app.py
+++ b/app.py
@@ -394,7 +394,7 @@ def systemd_users():
for line in lines:
# This assumes user names cannot contain spaces.
# loginctl list-users output must be in the UID NAME format.
- info = line.split(' ', 2)
+ info = line.lstrip().split(' ', 2)
if len(info) < 2:
raise RuntimeError(f'invalid `loginctl list-users` output:\n{output}')
uid, user = info[0], info[1]