X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/089142a562148d69dbccfba669b66eff78a7f5b5..da6e77b8d6a48f70f6741959e499561dd06ff472:/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: