check for existance of output files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25160 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
14dfb3d258
commit
6c72a02688
@ -122,7 +122,9 @@ def main(args):
|
||||
# blow away the old one if they are different.
|
||||
for dest, temp in [(swigDest, swigDestTemp),
|
||||
(pyDest, pyDestTemp)]:
|
||||
if open(dest).read() != open(temp).read():
|
||||
if not os.path.exists(dest):
|
||||
os.rename(temp, dest)
|
||||
elif open(dest).read() != open(temp).read():
|
||||
os.unlink(dest)
|
||||
os.rename(temp, dest)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user