From c8ce4f843a9d501f8ac67366d46f74cb40f13b8a Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Mon, 14 Aug 2017 00:47:34 +0200 Subject: [PATCH] [mod] style --- src/yunohost/user.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/yunohost/user.py b/src/yunohost/user.py index 3b783b3af..d2834b7bf 100644 --- a/src/yunohost/user.py +++ b/src/yunohost/user.py @@ -51,11 +51,14 @@ def user_list(auth, fields=None): fields -- fields to fetch """ - user_attrs = {'uid': 'username', - 'cn': 'fullname', - 'mail': 'mail', - 'maildrop': 'mail-forward', - 'mailuserquota': 'mailbox-quota'} + user_attrs = { + 'uid': 'username', + 'cn': 'fullname', + 'mail': 'mail', + 'maildrop': 'mail-forward', + 'mailuserquota': 'mailbox-quota' + } + attrs = ['uid'] users = {} @@ -70,7 +73,9 @@ def user_list(auth, fields=None): else: attrs = ['uid', 'cn', 'mail', 'mailuserquota'] - result = auth.search('ou=users,dc=yunohost,dc=org', '(&(objectclass=person)(!(uid=root))(!(uid=nobody)))', attrs) + result = auth.search('ou=users,dc=yunohost,dc=org', + '(&(objectclass=person)(!(uid=root))(!(uid=nobody)))', + attrs) for user in result: entry = {}