]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/distrib/build_renamers.py
added tech note about writing unit tests
[wxWidgets.git] / 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)]:
         # 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:
                 os.unlink(dest)
                 os.rename(temp, dest)
             else: