diff options
| author | bwarsaw | 2001-05-20 03:09:25 +0000 |
|---|---|---|
| committer | bwarsaw | 2001-05-20 03:09:25 +0000 |
| commit | 3a92a5940f178496caa220fdee74aecd407af8c9 (patch) | |
| tree | 28111b47282408ead7706474d8e68e6aea604f0f /Mailman/MailList.py | |
| parent | 0737539f6f2e75f9da739a0ea3f9179f2b171dca (diff) | |
| download | mailman-3a92a5940f178496caa220fdee74aecd407af8c9.tar.gz mailman-3a92a5940f178496caa220fdee74aecd407af8c9.tar.zst mailman-3a92a5940f178496caa220fdee74aecd407af8c9.zip | |
Diffstat (limited to 'Mailman/MailList.py')
| -rw-r--r-- | Mailman/MailList.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py index a7460ae39..52bb2b066 100644 --- a/Mailman/MailList.py +++ b/Mailman/MailList.py @@ -361,7 +361,12 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin, # Set things up for the language choices langs = self.GetAvailableLanguages() langnames = [_(Utils.GetLanguageDescr(L)) for L in langs] - langi = langs.index(self.preferred_language) + try: + langi = langs.index(self.preferred_language) + except ValueError: + # Someone must have deleted the list's preferred language. Could + # be other trouble lurking! + langi = 0 # XXX: Should this text be migrated into the templates dir? config_info['general'] = [ @@ -1449,4 +1454,5 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin, return self.language.get(lcname, self.preferred_language) def GetAvailableLanguages(self): - return Utils.GetDirectories(self._full_path) + dirs = Utils.GetDirectories(self._full_path) + return [d for d in dirs if mm_cfg.LC_DESCRIPTIONS.has_key(d)] |
