~abompard/mailman/import21

« back to all changes in this revision

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

  • Committer: Aurélien Bompard
  • Date: 2013-10-22 13:28:11 UTC
  • mfrom: (7215.2.10 3.0)
  • Revision ID: aurelien@bompard.org-20131022132811-d1utj61rqjm178k9
Merge from the main branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
234
234
            except TypeError:
235
235
                print('Type conversion error:', key, file=sys.stderr)
236
236
                raise
237
 
    # Handle the archiving policy
238
 
    if config_dict.get("archive"):
239
 
        if config_dict.get("archive_private"):
 
237
    # Handle the archiving policy.  In MM2.1 there were two boolean options
 
238
    # but only three of the four possible states were valid.  Now there's just
 
239
    # an enum.
 
240
    if config_dict.get('archive'):
 
241
        # For maximum safety, if for some strange reason there's no
 
242
        # archive_private key, treat the list as having private archives.
 
243
        if config_dict.get('archive_private', True):
240
244
            mlist.archive_policy = ArchivePolicy.private
241
245
        else:
242
246
            mlist.archive_policy = ArchivePolicy.public