aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xapp.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/app.py b/app.py
index 1ed34a0..67cdd6d 100755
--- a/app.py
+++ b/app.py
@@ -411,9 +411,11 @@ def systemd_users():
yield User(uid, user)
def show_users(users):
+ user_args = [user.name for user in users]
+ if not user_args:
+ return None
properties = 'UID', 'Name', 'RuntimePath'
prop_args = (arg for prop in properties for arg in ('-p', prop))
- user_args = (user.name for user in users)
output = Loginctl('show-user', *prop_args, '--value', *user_args).run().result()
lines = output.splitlines()
# Assuming that for muptiple users, the properties will be separated by