From 78f417ac7bc30d750934bb74fd922b001d20fd62 Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Thu, 31 May 2001 16:06:50 +0000 Subject: maketext(): When interpolating the dict into the template, catch ValueError too. This can happen if there's a typo in the template such that a bogus format character appears (e.g. %(blah)y). --- Mailman/Utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Mailman/Utils.py') diff --git a/Mailman/Utils.py b/Mailman/Utils.py index a73cbaf7a..7fb4f75d4 100644 --- a/Mailman/Utils.py +++ b/Mailman/Utils.py @@ -520,7 +520,7 @@ def maketext(templatefile, dict=None, raw=0, lang=None, mlist=None): if dict is not None: try: text = template % SafeDict(dict) - except TypeError: + except (TypeError, ValueError): # The template is really screwed up pass if raw: -- cgit v1.2.3-70-g09d2