diff options
| author | Barry Warsaw | 2014-04-14 12:12:39 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2014-04-14 12:12:39 -0400 |
| commit | ff6df86000da8fcb055101c5cede36b27cb0480a (patch) | |
| tree | 6b700bb00766dda02b8742f2ca9ef10c0ba3d2ee /src/mailman/commands/cli_import.py | |
| parent | b4d3a036b5949c6945b13416615cfd356a327ee2 (diff) | |
| parent | acc302099df53474e631117351f8116727c1ceb6 (diff) | |
| download | mailman-ff6df86000da8fcb055101c5cede36b27cb0480a.tar.gz mailman-ff6df86000da8fcb055101c5cede36b27cb0480a.tar.zst mailman-ff6df86000da8fcb055101c5cede36b27cb0480a.zip | |
Diffstat (limited to 'src/mailman/commands/cli_import.py')
| -rw-r--r-- | src/mailman/commands/cli_import.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mailman/commands/cli_import.py b/src/mailman/commands/cli_import.py index c8145429d..7d6cb2825 100644 --- a/src/mailman/commands/cli_import.py +++ b/src/mailman/commands/cli_import.py @@ -35,7 +35,7 @@ from mailman.core.i18n import _ from mailman.database.transaction import transactional from mailman.interfaces.command import ICLISubCommand from mailman.interfaces.listmanager import IListManager -from mailman.utilities.importer import import_config_pck +from mailman.utilities.importer import import_config_pck, Import21Error @@ -93,4 +93,8 @@ class Import21: print(_('Ignoring non-dictionary: {0!r}').format( config_dict), file=sys.stderr) continue - import_config_pck(mlist, config_dict) + try: + import_config_pck(mlist, config_dict) + except Import21Error as error: + print(error, file=sys.stderr) + sys.exit(1) |
