aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Utils.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Mailman/Utils.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py
index 5218fed8..5c9707c7 100644
--- a/Mailman/Utils.py
+++ b/Mailman/Utils.py
@@ -443,6 +443,9 @@ def UnobscureEmail(addr):
+class OuterExit(Exception):
+ pass
+
def findtext(templatefile, dict=None, raw=False, lang=None, mlist=None):
# Make some text from a template file. The order of searches depends on
# whether mlist and lang are provided. Once the templatefile is found,
@@ -509,7 +512,6 @@ def findtext(templatefile, dict=None, raw=False, lang=None, mlist=None):
searchdirs.append(os.path.join(mm_cfg.TEMPLATE_DIR, 'site'))
searchdirs.append(mm_cfg.TEMPLATE_DIR)
# Start scanning
- quickexit = 'quickexit'
fp = None
try:
for lang in languages:
@@ -517,12 +519,12 @@ def findtext(templatefile, dict=None, raw=False, lang=None, mlist=None):
filename = os.path.join(dir, lang, templatefile)
try:
fp = open(filename)
- raise quickexit
+ raise OuterExit
except IOError, e:
if e.errno <> errno.ENOENT: raise
# Okay, it doesn't exist, keep looping
fp = None
- except quickexit:
+ except OuterExit:
pass
if fp is None:
# Try one last time with the distro English template, which, unless