~abompard/mailman/moderation_reasons

« back to all changes in this revision

Viewing changes to src/mailman/commands/cli_import.py

  • Committer: Barry Warsaw
  • Date: 2014-04-14 18:00:23 UTC
  • mfrom: (7226.2.3 abompard)
  • Revision ID: barry@list.org-20140414180023-v26bi1l2xb9v08m2
 * Greatly improve the fidelity of the Mailman 2.1 list importer functionality
   (i.e. ``mailman import21``).  [Aurélien Bompard].

 * Fixed a typo in the IMailingList interface.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
from mailman.database.transaction import transactional
36
36
from mailman.interfaces.command import ICLISubCommand
37
37
from mailman.interfaces.listmanager import IListManager
38
 
from mailman.utilities.importer import import_config_pck
 
38
from mailman.utilities.importer import import_config_pck, Import21Error
39
39
 
40
40
 
41
41
 
93
93
                        print(_('Ignoring non-dictionary: {0!r}').format(
94
94
                            config_dict), file=sys.stderr)
95
95
                        continue
96
 
                    import_config_pck(mlist, config_dict)
 
96
                    try:
 
97
                        import_config_pck(mlist, config_dict)
 
98
                    except Import21Error as error:
 
99
                        print(error, file=sys.stderr)
 
100
                        sys.exit(1)