From 6c72a026888de208bc7095b23dd16ea6c320a2bf Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 14 Jan 2004 01:50:35 +0000 Subject: [PATCH] check for existance of output files git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25160 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/distrib/build_renamers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wxPython/distrib/build_renamers.py b/wxPython/distrib/build_renamers.py index 5a56b9214b..e99acb3a8f 100755 --- a/wxPython/distrib/build_renamers.py +++ b/wxPython/distrib/build_renamers.py @@ -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: