]> git.saurik.com Git - wxWidgets.git/commitdiff
check for existance of output files
authorRobin Dunn <robin@alldunn.com>
Wed, 14 Jan 2004 01:50:35 +0000 (01:50 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 14 Jan 2004 01:50:35 +0000 (01:50 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25160 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/distrib/build_renamers.py

index 5a56b9214b75ea18375abc75de3286834108a190..e99acb3a8f14aff093a628c46c744bed92a7fd42 100755 (executable)
@@ -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: