From bb5bb2180186cd5cf138f4d17bb315e228d0a563 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 26 Nov 2006 14:14:01 +0000 Subject: For bug #8423, make dispatch-conf preserve timestamps when possible. svn path=/main/trunk/; revision=5136 --- bin/dispatch-conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/dispatch-conf b/bin/dispatch-conf index 6a007ab53..28c471e94 100755 --- a/bin/dispatch-conf +++ b/bin/dispatch-conf @@ -279,8 +279,7 @@ class dispatch: the diff of what changed into the configured log file.""" os.system((DIFF_CONTENTS % (curconf, newconf)) + '>>' + self.options["log-file"]) try: - shutil.copyfile(newconf, curconf) - os.remove(newconf) + os.rename(newconf, curconf) except (IOError, os.error), why: print >> sys.stderr, 'dispatch-conf: Error renaming %s to %s: %s; fatal' % \ (newconf, curconf, str(why)) -- cgit v1.2.3-1-g7c22