summaryrefslogtreecommitdiff
path: root/Mailman/Utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman/Utils.py')
-rw-r--r--Mailman/Utils.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py
index 2a2bfc41e..5ffdb99c7 100644
--- a/Mailman/Utils.py
+++ b/Mailman/Utils.py
@@ -275,13 +275,16 @@ def GetPossibleMatchingAddrs(name):
-def List2Dict(list):
- """List2Dict returns a dict keyed by the entries in the list
- passed to it."""
- res = {}
- for item in list:
- res[item] = 1
- return res
+def List2Dict(list, foldcase=0):
+ """Return a dict keyed by the entries in the list passed to it."""
+ d = {}
+ if foldcase:
+ for i in list:
+ d[i.lower()] = 1
+ else:
+ for i in list:
+ d[i] = 1
+ return d
def FindMatchingAddresses(name, dict, *dicts):