~abompard/mailman/import21

« back to all changes in this revision

Viewing changes to src/mailman/utilities/importer.py

  • Committer: Aurélien Bompard
  • Date: 2013-09-20 16:27:49 UTC
  • Revision ID: aurelien@bompard.org-20130920162749-0pv1wdnz8jwq0ss0
When importing from 2.1, handle the archiving policy

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
from mailman.interfaces.digests import DigestFrequency
34
34
from mailman.interfaces.mailinglist import Personalization, ReplyToMunging
35
35
from mailman.interfaces.nntp import NewsgroupModeration
 
36
from mailman.interfaces.archiver import ArchivePolicy
36
37
 
37
38
 
38
39
 
90
91
            except TypeError:
91
92
                print('Type conversion error:', key, file=sys.stderr)
92
93
                raise
 
94
    # Handle the archiving policy
 
95
    if config_dict.get("archive"):
 
96
        if config_dict.get("archive_private"):
 
97
            mlist.archive_policy = ArchivePolicy.private
 
98
        else:
 
99
            mlist.archive_policy = ArchivePolicy.public
 
100
    else:
 
101
        mlist.archive_policy = ArchivePolicy.never