aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Mailman/i18n.py8
-rw-r--r--NEWS2
2 files changed, 8 insertions, 2 deletions
diff --git a/Mailman/i18n.py b/Mailman/i18n.py
index 7fe3b7ce..c2d0896c 100644
--- a/Mailman/i18n.py
+++ b/Mailman/i18n.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2000-2006 by the Free Software Foundation, Inc.
+# Copyright (C) 2000-2010 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -87,7 +87,11 @@ def _(s):
for k, v in dict.items():
if isinstance(v, UnicodeType):
dict[k] = v.encode(charset, 'replace')
- return tns % dict
+ try:
+ return tns % dict
+ except (ValueError, KeyError, TypeError):
+ # Bad interpolation format. Punt.
+ return tns
diff --git a/NEWS b/NEWS
index b5a968e9..148133e7 100644
--- a/NEWS
+++ b/NEWS
@@ -44,6 +44,8 @@ Here is a history of user visible changes to Mailman.
Bug Fixes and other patches
+ - Fixed i18n._() to catch exceptions due to bad formats. Bug #632660.
+
- Fixed admindb interface to decode base64 and quoted-printable encoded
message body excerpts for display. Bug #629738.