Update of /cvsroot/mailman/mailman/bin
In directory sc8-pr-cvs1:/tmp/cvs-serv22499
Modified Files:
Tag: Release_2_1-maint
update
Log Message:
dolist(): Don't move o_tmpl to n_tmpl if the former doesn't exist.
Index: update
===================================================================
RCS file: /cvsroot/mailman/mailman/bin/update,v
retrieving revision 2.22
retrieving revision 2.22.2.1
diff -u -d -r2.22 -r2.22.2.1
--- update 2 Dec 2002 14:46:35 -0000 2.22
+++ update 27 Dec 2003 01:00:32 -0000 2.22.2.1
@@ -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 @@
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
_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
Unsubscribe: http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org