summaryrefslogtreecommitdiffstats
path: root/pykolab/plugins/recipientpolicy
diff options
context:
space:
mode:
authorChristoph Erhardt <kolab@sicherha.de>2021-06-05 09:59:24 +0200
committerChristoph Erhardt <kolab@sicherha.de>2022-01-10 20:48:40 +0100
commitc3b9d5557161f840a8f2c45fc91ec09299593dd9 (patch)
tree93105906638753c8d040af85226f30ae63963cbf /pykolab/plugins/recipientpolicy
parent991255eaa314b51e2dd586460311d4633a56eb86 (diff)
downloadpykolab-c3b9d5557161f840a8f2c45fc91ec09299593dd9.tar.gz
[Python 3] Remove unnecessary occurrences of .keys()
Summary: The following cases are covered: * for key in dict * if key in dict * len(dict) This will make life easier for futurize. Reviewers: machniak, mollekopf Reviewed By: mollekopf Differential Revision: https://git.kolab.org/D3235
Diffstat (limited to 'pykolab/plugins/recipientpolicy')
-rw-r--r--pykolab/plugins/recipientpolicy/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pykolab/plugins/recipientpolicy/__init__.py b/pykolab/plugins/recipientpolicy/__init__.py
index aab2a5e..94c707f 100644
--- a/pykolab/plugins/recipientpolicy/__init__.py
+++ b/pykolab/plugins/recipientpolicy/__init__.py
@@ -130,8 +130,8 @@ class KolabRecipientpolicy(object):
traceback.print_exc()
return []
- for number in alternative_mail_routines.keys():
- for routine in alternative_mail_routines[number].keys():
+ for number in alternative_mail_routines:
+ for routine in alternative_mail_routines[number]:
try:
exec("retval = '%s'.%s" % (routine,alternative_mail_routines[number][routine] % user_attrs))