diff options
| author | Barry Warsaw | 2009-12-10 22:32:25 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2009-12-10 22:32:25 -0500 |
| commit | 8938d65327611dded72c7876ffe52e4d4d12ce76 (patch) | |
| tree | 7e2d5c354dd53f1d3f8c42b4a11a9b58b2c2fcb1 /src/mailman/commands/cli_lists.py | |
| parent | fbc81f61609ce0504245934d9bed0690fbd331a7 (diff) | |
| download | mailman-8938d65327611dded72c7876ffe52e4d4d12ce76.tar.gz mailman-8938d65327611dded72c7876ffe52e4d4d12ce76.tar.zst mailman-8938d65327611dded72c7876ffe52e4d4d12ce76.zip | |
Diffstat (limited to 'src/mailman/commands/cli_lists.py')
| -rw-r--r-- | src/mailman/commands/cli_lists.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mailman/commands/cli_lists.py b/src/mailman/commands/cli_lists.py index d3833c2b0..93749c45a 100644 --- a/src/mailman/commands/cli_lists.py +++ b/src/mailman/commands/cli_lists.py @@ -40,6 +40,7 @@ from mailman.email.message import UserNotification from mailman.interfaces.command import ICLISubCommand from mailman.interfaces.domain import ( BadDomainSpecificationError, IDomainManager) +from mailman.interfaces.languages import ILanguageManager from mailman.interfaces.listmanager import IListManager, ListAlreadyExistsError @@ -174,7 +175,7 @@ class Create: if args.language is not None else system_preferences.preferred_language.code) # Make sure that the selected language code is known. - if language_code not in config.languages.codes: + if language_code not in getUtility(ILanguageManager).codes: self.parser.error(_('Invalid language code: $language_code')) return assert len(args.listname) == 1, ( @@ -199,7 +200,7 @@ class Create: # Find the language associated with the code, then set the mailing # list's preferred language to that. The changes then must be # committed to the database. - mlist.preferred_language = config.languages[language_code] + mlist.preferred_language = getUtility(ILanguageManager)[language_code] config.db.commit() # Do the notification. if not args.quiet: |
