------------------------------------------------------------
revno: 1260
committer: Mark Sapiro <[email protected]>
branch nick: 2.1
timestamp: Tue 2010-09-07 13:10:57 -0700
message:
  Fixed i18n._() to catch exceptions due to bad formats.  Bug #632660.
modified:
  Mailman/i18n.py
  NEWS


--
lp:mailman/2.1
https://code.launchpad.net/~mailman-coders/mailman/2.1

Your team Mailman Checkins is subscribed to branch lp:mailman/2.1.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.1/+edit-subscription
=== modified file 'Mailman/i18n.py'
--- Mailman/i18n.py	2006-02-23 06:25:29 +0000
+++ Mailman/i18n.py	2010-09-07 20:10:57 +0000
@@ -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 @@
     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
 
 
 

=== modified file 'NEWS'
--- NEWS	2010-09-03 19:30:34 +0000
+++ NEWS	2010-09-07 20:10:57 +0000
@@ -44,6 +44,8 @@
 
   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.
 

_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to