X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/089142a562148d69dbccfba669b66eff78a7f5b5..0a5bb138a71dfc1c706fc0858fb2801500e2c2e8:/wxPython/distrib/build_renamers.py 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: