From 9e2e0e09fda9c37a3a21e50243b56b5e6f852510 Mon Sep 17 00:00:00 2001 From: bwarsaw <> Date: Sat, 27 Dec 2003 01:00:32 +0000 Subject: dolist(): Don't move o_tmpl to n_tmpl if the former doesn't exist. --- bin/update | 14 +++++++++----- 1 file 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 -- cgit v1.2.3