diff options
| author | bwarsaw | 1999-01-06 23:10:22 +0000 |
|---|---|---|
| committer | bwarsaw | 1999-01-06 23:10:22 +0000 |
| commit | d637a69de4fd9cf94beb5e84c0bfea1e6165c387 (patch) | |
| tree | b07ee98fcefb4078d5fd3629fa13735207545636 | |
| parent | eb2a21d2971cadc2e7b2a06b34b485900c745f6e (diff) | |
| download | mailman-d637a69de4fd9cf94beb5e84c0bfea1e6165c387.tar.gz mailman-d637a69de4fd9cf94beb5e84c0bfea1e6165c387.tar.zst mailman-d637a69de4fd9cf94beb5e84c0bfea1e6165c387.zip | |
chunkify(): Don't put mm_cfg.DEFAULT_ADMIN_MEMBER_CHUNKSIZE as a
default arg value because then this module can't be imported in older
versions of Mailman. Use None in the arglist, and set to the proper
value when None is detected.
| -rw-r--r-- | Mailman/Utils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py index c0e1fabf7..3cc6c35e5 100644 --- a/Mailman/Utils.py +++ b/Mailman/Utils.py @@ -506,10 +506,12 @@ def map_maillists(func, names=None, unlock=None, verbose=0): return got -def chunkify(members, chunksize=mm_cfg.DEFAULT_ADMIN_MEMBER_CHUNKSIZE): +def chunkify(members, chunksize=None): """ return a list of lists of members """ + if chunksize is None: + chunksize = mm_cfg.DEFAULT_ADMIN_MEMBER_CHUNKSIZE members.sort() res = [] while 1: |
