diff options
author | bwarsaw <> | 2003-11-27 16:28:18 +0000 |
---|---|---|
committer | bwarsaw <> | 2003-11-27 16:28:18 +0000 |
commit | 3bad686b1205af635f9c37f9c8e4102ee9e9578a (patch) | |
tree | 9542e3676ee76c4a0dce1d020cc1986f72ef007a | |
parent | 7dd58bcf0dfebc16365b011bb23a0497335f0d2b (diff) | |
download | mailman2-3bad686b1205af635f9c37f9c8e4102ee9e9578a.tar.gz mailman2-3bad686b1205af635f9c37f9c8e4102ee9e9578a.tar.xz mailman2-3bad686b1205af635f9c37f9c8e4102ee9e9578a.zip |
GetAvailableLanguages(): Strip out any language codes that aren't in
LC_DESCRIPTIONS. This is mostly useful for debugging since I
occasionally add languages for testing and then disable them.
-rw-r--r-- | Mailman/MailList.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py index 143987c6..541d12d3 100644 --- a/Mailman/MailList.py +++ b/Mailman/MailList.py @@ -1386,4 +1386,6 @@ bad regexp in bounce_matching_header line: %s # preferred language. if mm_cfg.DEFAULT_SERVER_LANGUAGE not in langs: langs.append(mm_cfg.DEFAULT_SERVER_LANGUAGE) - return langs + # When testing, it's possible we've disabled a language, so just + # filter things out so we don't get tracebacks. + return [lang for lang in langs if mm_cfg.LC_DESCRIPTIONS.has_key(lang)] |