~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-15 07:27:18 UTC
  • Revision ID: aurelien@bompard.org-20131015072718-hl6v9a663b124v6y
Handle acceptable_aliases being a list in the pickle

Show diffs side-by-side

added added

removed removed

Lines of Context:
246
246
    for addr in config_dict.get('ban_list', []):
247
247
        IBanManager(mlist).ban(str_to_unicode(addr))
248
248
    # Handle acceptable aliases
249
 
    for addr in config_dict.get('acceptable_aliases', '').splitlines():
 
249
    acceptable_aliases = config_dict.get('acceptable_aliases', '')
 
250
    if isinstance(acceptable_aliases, basestring):
 
251
        acceptable_aliases = acceptable_aliases.splitlines()
 
252
    for addr in acceptable_aliases:
250
253
        addr = addr.strip()
251
254
        if not addr:
252
255
            continue