[password-resets] Use a built-in module instead
- From: Andrea Veri <averi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [password-resets] Use a built-in module instead
- Date: Wed, 1 Sep 2021 16:06:32 +0000 (UTC)
commit d76252b3b20d43c51b70b3d284cc89b4d4b892b4
Author: Andrea Veri <averi redhat com>
Date: Wed Sep 1 18:06:18 2021 +0200
Use a built-in module instead
app.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/app.py b/app.py
index c9f7d61..683c23c 100644
--- a/app.py
+++ b/app.py
@@ -54,8 +54,7 @@ def form_post(request: Request, username: str = Form(...)):
mail = glu.get_attributes_from_ldap(username, 'mail')
if mail:
- from itertools import chain
- infrateam = chain(glu.get_group_from_ldap('accounts'), glu.get_group_from_ldap('sysadmin'), \
+ infrateam = list(set.union(glu.get_group_from_ldap('accounts'), glu.get_group_from_ldap('sysadmin'),
\
glu.get_group_from_ldap('admins'))
if username not in infrateam:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]