# 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:
addWX = True
- if doRename:
+ if doRename and name:
old = new = name
if old.startswith('wx') and not old.startswith('wxEVT_'):
# remove all wx prefixes except wxEVT_ and write a %rename directive for it