diff options
| author | viega | 1998-05-30 06:06:53 +0000 |
|---|---|---|
| committer | viega | 1998-05-30 06:06:53 +0000 |
| commit | 4cf754ca57ef2e904082e105fcd4b78f97ed00a9 (patch) | |
| tree | a81db0267323e4200988d828cf3d83e206d06ce5 /modules/mm_utils.py | |
| parent | bc98003ed7879c4bf32735750c2a1adf88fbe3d3 (diff) | |
| download | mailman-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 'modules/mm_utils.py')
| -rw-r--r-- | modules/mm_utils.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/mm_utils.py b/modules/mm_utils.py index bc6b6a8da..419ae06a0 100644 --- a/modules/mm_utils.py +++ b/modules/mm_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 |
