diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2022-01-23 16:22:50 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2022-01-23 16:22:50 +0300 |
commit | b1e487a7a819d92cbbe9233caa6d38cad23e5272 (patch) | |
tree | 38bb2dd2f2f5876491c322a39f77b44eead1b9ed /app.py | |
parent | top: run with -E/-e if supported (diff) | |
download | linux-status-b1e487a7a819d92cbbe9233caa6d38cad23e5272.tar.gz linux-status-b1e487a7a819d92cbbe9233caa6d38cad23e5272.zip |
app.py: fix loginctl output parsing
Diffstat (limited to 'app.py')
-rwxr-xr-x | app.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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] |