From 492d9f664a9bdacb1b55f52d02cf3c5a5f2e39ca Mon Sep 17 00:00:00 2001 From: Daniel STAN Date: Thu, 24 Apr 2014 12:02:05 +0200 Subject: [PATCH] skip "whoami" key instead of popping --- client.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client.py b/client.py index 3b18d95..99cdb36 100755 --- a/client.py +++ b/client.py @@ -495,8 +495,9 @@ def get_recipients_of_roles(options, roles): """Renvoie les destinataires d'une liste de rĂ´les""" recipients = set() allroles = all_roles(options) - allroles.pop("whoami") for role in roles: + if role == u"whoami": + continue for recipient in allroles[role]: recipients.add(recipient) return recipients @@ -604,6 +605,8 @@ def show_roles(options): print(u"Liste des roles disponibles".encode("utf-8")) allroles = all_roles(options) for (role, usernames) in allroles.iteritems(): + if role == u"whoami": + continue if not role.endswith('-w'): print((u" * %s : %s" % (role, ", ".join(usernames))).encode("utf-8"))