From 7971cdb1d36862db483547c974f1e2e40980f3d3 Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Sun, 31 Dec 2006 23:20:48 +0000 Subject: Import list topics and header filters. Still to do: user topic selections. --- Mailman/bin/import.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Mailman/bin/import.py b/Mailman/bin/import.py index b4d62a8f2..3d1210c8f 100644 --- a/Mailman/bin/import.py +++ b/Mailman/bin/import.py @@ -96,12 +96,14 @@ def parse_config(node): value = int(value) except ValueError: value = float(value) - elif vtype == 'header_filter': - # XXX - value = [] - elif vtype == 'topics': - # XXX + elif vtype in ('header_filter', 'topics'): value = [] + fakebltins = dict(__builtins__ = dict(True=True, False=False)) + for subnode in nodegen(child): + reprstr = nodetext(subnode) + # Turn the reprs back into tuples, in a safe way + tupleval = eval(reprstr, fakebltins) + value.append(tupleval) else: value = nodetext(child) # And now some special casing :( -- cgit v1.3.1