summaryrefslogtreecommitdiff
path: root/Mailman/Utils.py
diff options
context:
space:
mode:
authorbwarsaw2006-07-30 19:21:02 +0000
committerbwarsaw2006-07-30 19:21:02 +0000
commit347bd559f5559775ac489e89c47c1206eae0711c (patch)
tree18cf9cf1ca5ca1feb786d3a6b0bd35b3078b5812 /Mailman/Utils.py
parent13185804a6a138449be016fe187833c6630af991 (diff)
downloadmailman-347bd559f5559775ac489e89c47c1206eae0711c.tar.gz
mailman-347bd559f5559775ac489e89c47c1206eae0711c.tar.zst
mailman-347bd559f5559775ac489e89c47c1206eae0711c.zip
Diffstat (limited to 'Mailman/Utils.py')
-rw-r--r--Mailman/Utils.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py
index b190e2ded..53ece3ecd 100644
--- a/Mailman/Utils.py
+++ b/Mailman/Utils.py
@@ -432,6 +432,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,
@@ -498,7 +501,6 @@ def findtext(templatefile, dict=None, raw=False, lang=None, mlist=None):
searchdirs.append(os.path.join(config.TEMPLATE_DIR, 'site'))
searchdirs.append(config.TEMPLATE_DIR)
# Start scanning
- quickexit = 'quickexit'
fp = None
try:
for lang in languages:
@@ -506,12 +508,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