diff options
author | bwarsaw <> | 2003-12-27 01:00:32 +0000 |
---|---|---|
committer | bwarsaw <> | 2003-12-27 01:00:32 +0000 |
commit | 9e2e0e09fda9c37a3a21e50243b56b5e6f852510 (patch) | |
tree | 2b81dcadcacd8054eab9289d8fb1d3cf57b66d1e /bin | |
parent | 200ca2ebc9e16cd38c0aaecfe9f1a10333ead8c2 (diff) | |
download | mailman2-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 'bin')
-rwxr-xr-x | bin/update | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -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 |