[Buildbot-devel] Some questions/problems running latest build bot source on Windows
Brian Warner
warner-buildbot at lothar.com
Fri Nov 12 22:36:07 UTC 2004
> From: Tommi Virtanen <tv at tv.debian.net>
>
> That's downright dangerous if the file is in any way precious.
> os.rename can fail due to e.g. no memory available, causing you
> to run that unlink, and then fail _again_ to rename the file, thus
> losing the target file.
>
> I'd suggest making any windows-specific fixes just that --
> windows-specific. if os.sys.platform == 'win32': ...
*nod*
/me commits fix
> PS. os.rename isn't safe on NFS, you really should use os.link.
What is the recommended pattern? Something like this?:
open(tmpfile,"w").write(stuff)
os.link(file, tmpfile)
os.unlink(tmpfile)
thanks,
-Brian
More information about the devel
mailing list