From d6f9ed0fd31de8b3887876b10c1378309d3131eb Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Fri, 23 Feb 2001 23:57:45 +0000 Subject: SnarfHTMLTemplate(): Don't try to fall back to lists// to find the template if lists// doesn't exist. The update script now creates the `en' language subdir and moves all the templates into it. --- Mailman/HTMLFormatter.py | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'Mailman/HTMLFormatter.py') diff --git a/Mailman/HTMLFormatter.py b/Mailman/HTMLFormatter.py index 77a5970d8..6d0966f9d 100644 --- a/Mailman/HTMLFormatter.py +++ b/Mailman/HTMLFormatter.py @@ -71,17 +71,10 @@ class HTMLFormatter: lang = self.preferred_language HTMLFormatter.InitVars(self) filename = os.path.join(self._template_dir, lang, file) - try: - f = open(filename) - except IOError, e: - if e.errno <> errno.ENOENT: raise - # Could be a list that was created before i18n support was added. - # In that case, use the templates one directory higher. - filename = os.path.join(self._template_dir, file) - f = open(filename) - str = f.read() - f.close() - return str + fp = open(filename) + data = fp.read() + fp.close() + return data def FormatUsers(self, digest, lang=None): if lang is None: -- cgit v1.2.3-70-g09d2