summaryrefslogtreecommitdiff
path: root/Mailman/Utils.py
diff options
context:
space:
mode:
authorviega1998-05-30 06:06:53 +0000
committerviega1998-05-30 06:06:53 +0000
commit4cf754ca57ef2e904082e105fcd4b78f97ed00a9 (patch)
treea81db0267323e4200988d828cf3d83e206d06ce5 /Mailman/Utils.py
parentbc98003ed7879c4bf32735750c2a1adf88fbe3d3 (diff)
downloadmailman-4cf754ca57ef2e904082e105fcd4b78f97ed00a9.tar.gz
mailman-4cf754ca57ef2e904082e105fcd4b78f97ed00a9.tar.zst
mailman-4cf754ca57ef2e904082e105fcd4b78f97ed00a9.zip
Integrated Scott's cookie code into the distribution.
Note that it does have one problem... If you have cookies off, you have to log in every time, plus your changes don't take effect! That definitely needs to be fixed.
Diffstat (limited to 'Mailman/Utils.py')
-rw-r--r--Mailman/Utils.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py
index bc6b6a8da..419ae06a0 100644
--- a/Mailman/Utils.py
+++ b/Mailman/Utils.py
@@ -477,3 +477,17 @@ class StampedLogger(Logger):
Logger.write(self, ' ' + l)
else:
Logger.write(self, l)
+
+def chunkify(members, chunksize=mm_cfg.ADMIN_MEMBER_CHUNKSIZE):
+ """
+ return a list of lists of members
+ """
+ members.sort()
+ res = []
+ while 1:
+ if not members:
+ break
+ chunk = members[:chunksize]
+ res.append(chunk)
+ members = members[chunksize:]
+ return res