[Mailman-Developers] a bug in updating to current cvs :
Barry A. Warsaw
barry@zope.com
Mon, 7 Jan 2002 18:03:03 -0500
I hadn't thought about the situation where your default site language
is not 'en' and the language which /is/ your site language is missing
a template. Mailman should always fall back to the English template
as a last resort.
Can you try this (untested) patch -- before Ousmane checks in the
French emptyarchive.html file? I'm in a meeting so I can't test this
yet myself, but I will later tonight. If it works, I'll check this
in.
Thanks,
-Barry
Index: Utils.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Utils.py,v
retrieving revision 2.25
diff -u -r2.25 Utils.py
--- Utils.py 2002/01/06 07:49:03 2.25
+++ Utils.py 2002/01/07 23:02:46
@@ -480,8 +480,14 @@
except quickexit:
pass
if fp is None:
- # We never found the template. BAD!
- raise IOError(errno.ENOENT, 'No template file found', templatefile)
+ # Try one last time with the distro English template, which, unless
+ # you've got a really broken installation, must be there.
+ try:
+ fp = open(os.path.join(mm_cfg.TEMPLATE_DIR, 'en', templatefile))
+ except IOError, e:
+ if e.errno <> errno.ENOENT: raise
+ # We never found the template. BAD!
+ raise IOError(errno.ENOENT, 'No template file found', templatefile)
template = fp.read()
fp.close()
text = template