aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorbwarsaw <>2003-12-27 01:00:32 +0000
committerbwarsaw <>2003-12-27 01:00:32 +0000
commit9e2e0e09fda9c37a3a21e50243b56b5e6f852510 (patch)
tree2b81dcadcacd8054eab9289d8fb1d3cf57b66d1e /bin
parent200ca2ebc9e16cd38c0aaecfe9f1a10333ead8c2 (diff)
downloadmailman2-9e2e0e09fda9c37a3a21e50243b56b5e6f852510.tar.gz
mailman2-9e2e0e09fda9c37a3a21e50243b56b5e6f852510.tar.xz
mailman2-9e2e0e09fda9c37a3a21e50243b56b5e6f852510.zip
dolist(): Don't move o_tmpl to n_tmpl if the former doesn't exist.
Diffstat (limited to '')
-rwxr-xr-xbin/update14
1 files changed, 9 insertions, 5 deletions
diff --git a/bin/update b/bin/update
index b0b425d3..97c35c45 100755
--- a/bin/update
+++ b/bin/update
@@ -1,6 +1,6 @@
#! @PYTHON@
#
-# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2003 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -347,12 +347,16 @@ script.
for f in os.listdir(b4_tmpl_dir):
o_tmpl = os.path.join(b4_tmpl_dir, f)
n_tmpl = os.path.join(new_tmpl_dir, f)
- if not os.path.exists(n_tmpl):
- os.rename(o_tmpl, n_tmpl)
- print _('- moved %(o_tmpl)s to %(n_tmpl)s')
+ if os.path.exists(o_tmpl):
+ if not os.path.exists(n_tmpl):
+ os.rename(o_tmpl, n_tmpl)
+ print _('- moved %(o_tmpl)s to %(n_tmpl)s')
+ else:
+ print _("""\
+- both %(o_tmpl)s and %(n_tmpl)s exist, leaving untouched""")
else:
print _("""\
-- both %(o_tmpl)s and %(n_tmpl)s exist, leaving untouched""")
+- %(o_tmpl)s doesn't exist, leaving untouched""")
#
# Move all the templates to the en language subdirectory as required for
# Mailman 2.1