From 546a40a653d87d8610a5c58b3e6d3c608dfc6f33 Mon Sep 17 00:00:00 2001 From: Xinyu Hou Date: Tue, 4 Nov 2014 13:27:47 +0000 Subject: [PATCH] Checked source and target existence when move #4149 --- ext/toolchain/commands1.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/toolchain/commands1.py b/ext/toolchain/commands1.py index 1dd15f65..bc260944 100644 --- a/ext/toolchain/commands1.py +++ b/ext/toolchain/commands1.py @@ -795,8 +795,10 @@ class InternalCommands: os.symlink(source, target) def move(self, source, target): - print 'move: ', source,'-->', target - shutil.move(source, target) + if os.path.exists(source): + if not os.path.exists(target): + print 'move: ', source,'-->', target + shutil.move(source, target) def macPostMake(self, target):