Return-Path: Delivered-To: apmail-gump-commits-archive@www.apache.org Received: (qmail 92462 invoked from network); 6 Apr 2010 04:36:16 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Apr 2010 04:36:16 -0000 Received: (qmail 85265 invoked by uid 500); 6 Apr 2010 04:36:15 -0000 Mailing-List: contact commits-help@gump.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: general@gump.apache.org Delivered-To: mailing list commits@gump.apache.org Received: (qmail 85257 invoked by uid 99); 6 Apr 2010 04:36:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Apr 2010 04:36:14 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Apr 2010 04:36:11 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 6F14E23889B9; Tue, 6 Apr 2010 04:35:50 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r931011 - /gump/trunk/python/gump/util/sync.py Date: Tue, 06 Apr 2010 04:35:50 -0000 To: commits@gump.apache.org From: bodewig@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100406043550.6F14E23889B9@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: bodewig Date: Tue Apr 6 04:35:50 2010 New Revision: 931011 URL: http://svn.apache.org/viewvc?rev=931011&view=rev Log: remove dest file before copy, this should help if the dest file is read-only Modified: gump/trunk/python/gump/util/sync.py Modified: gump/trunk/python/gump/util/sync.py URL: http://svn.apache.org/viewvc/gump/trunk/python/gump/util/sync.py?rev=931011&r1=931010&r2=931011&view=diff ============================================================================== --- gump/trunk/python/gump/util/sync.py (original) +++ gump/trunk/python/gump/util/sync.py Tue Apr 6 04:35:50 2010 @@ -346,6 +346,8 @@ class PathWalker(Annotatable): log.debug("Attempting copy from [%s] to [%s]" %(`srcname`, `dstname`)) self.displayAction(True, ' U> ', dstname, reason) + if os.path.exists(dstname): + os.remove(dstname) shutil.copy2(srcname, dstname) #else: # log.debug("Do not copy from [%s:%s] to [%s:%s]" \