summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw2001-07-03 04:35:30 +0000
committerbwarsaw2001-07-03 04:35:30 +0000
commitb0f7342b6f59f12f41773759b24db3df398c8917 (patch)
tree2e75577220a8317b14ecbcadaefb007ba3710eba
parent096b4c89b916052f60b9105dd59f04b072a2bf3b (diff)
downloadmailman-b0f7342b6f59f12f41773759b24db3df398c8917.tar.gz
mailman-b0f7342b6f59f12f41773759b24db3df398c8917.tar.zst
mailman-b0f7342b6f59f12f41773759b24db3df398c8917.zip
move_language_templates(): if the TEMPLATE_DIR/gtemplate couldn't be
opened, then assume it's a new template added with this upgrade, and don't attempt to search for more specific, but identical templates.
-rwxr-xr-xbin/update7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/update b/bin/update
index 8459863d7..556559b64 100755
--- a/bin/update
+++ b/bin/update
@@ -112,7 +112,12 @@ def move_language_templates(mlist):
# First, get rid of any lists/<list> template or lists/<list>/en template
# that is identical to the global templates/* default.
for gtemplate in os.listdir(os.path.join(mm_cfg.TEMPLATE_DIR, 'en')):
- fp = open(os.path.join(mm_cfg.TEMPLATE_DIR, gtemplate))
+ try:
+ fp = open(os.path.join(mm_cfg.TEMPLATE_DIR, gtemplate))
+ except IOError, e:
+ if e.errno <> errno.ENOENT: raise
+ # No global template
+ continue
gcksum = md5.new(fp.read()).digest()
fp.close()
# Match against the lists/<list>/* template