[sysadmin-bin] Cleanup: don't need to be part of a list
- From: Andrea Veri <averi src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] Cleanup: don't need to be part of a list
- Date: Wed, 19 May 2021 13:20:03 +0000 (UTC)
commit 3be9a6964f94213264e94ee33f79af06e43aea98
Author: Andrea Veri <averi redhat com>
Date: Wed May 19 15:18:57 2021 +0200
Cleanup: don't need to be part of a list
gitlab/gitlab-operations.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gitlab/gitlab-operations.py b/gitlab/gitlab-operations.py
index 542963d..eb7e298 100755
--- a/gitlab/gitlab-operations.py
+++ b/gitlab/gitlab-operations.py
@@ -41,20 +41,20 @@ for uid in committers_exceptions:
continue
gnome_group = gl.groups.get(8, with_projects=False)
-gnome_group_users = [ { i.username : i.id for i in gnome_group.members.list(all=True) } ]
+gnome_group_users = { i.username : i.id for i in gnome_group.members.list(all=True) }
gnome_projects = gnome_group.projects.list(all=True)
l10n_group = gl.groups.get(13336, with_projects=False)
for username, id in _committers.items():
- if id not in gnome_group_users[0].values():
+ if id not in gnome_group_users.values():
gnome_group.members.create({'user_id': id, 'access_level': gitlab.DEVELOPER_ACCESS})
print(f"Account with username { username } and with id { id } has been added to the GNOME group")
l10n_group.members.create({'user_id': id, 'access_level': gitlab.REPORTER_ACCESS})
print(f"Account with username { username } and id { id } has been added to the Teams/Translation
group")
-for username, id in gnome_group_users[0].items():
+for username, id in gnome_group_users.items():
if id not in _committers.values() and id not in _committers_exceptions.values():
role = gnome_group.members.get(id).access_level
if role != 20 and id != 1:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]