From d637a69de4fd9cf94beb5e84c0bfea1e6165c387 Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Wed, 6 Jan 1999 23:10:22 +0000 Subject: 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. --- Mailman/Utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Mailman/Utils.py') 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: -- cgit v1.2.3-70-g09d2