Commit 492d9f66 authored by Daniel Stan's avatar Daniel Stan

skip "whoami" key instead of popping

parent 53eb46d6
...@@ -495,8 +495,9 @@ def get_recipients_of_roles(options, roles): ...@@ -495,8 +495,9 @@ def get_recipients_of_roles(options, roles):
"""Renvoie les destinataires d'une liste de rôles""" """Renvoie les destinataires d'une liste de rôles"""
recipients = set() recipients = set()
allroles = all_roles(options) allroles = all_roles(options)
allroles.pop("whoami")
for role in roles: for role in roles:
if role == u"whoami":
continue
for recipient in allroles[role]: for recipient in allroles[role]:
recipients.add(recipient) recipients.add(recipient)
return recipients return recipients
...@@ -604,6 +605,8 @@ def show_roles(options): ...@@ -604,6 +605,8 @@ def show_roles(options):
print(u"Liste des roles disponibles".encode("utf-8")) print(u"Liste des roles disponibles".encode("utf-8"))
allroles = all_roles(options) allroles = all_roles(options)
for (role, usernames) in allroles.iteritems(): for (role, usernames) in allroles.iteritems():
if role == u"whoami":
continue
if not role.endswith('-w'): if not role.endswith('-w'):
print((u" * %s : %s" % (role, ", ".join(usernames))).encode("utf-8")) print((u" * %s : %s" % (role, ", ".join(usernames))).encode("utf-8"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment