58
self.tmpfilename = '%s.%d.%s.%s.tmp' % (filename, _pid, _hostname,
61
62
self.realfilename = filename
63
64
flags = os.O_EXCL | os.O_CREAT | os.O_WRONLY
65
66
flags |= osutils.O_BINARY
74
73
# Use a low level fd operation to avoid chmodding later.
75
74
# This may not succeed, but it should help most of the time
76
75
self._fd = os.open(self.tmpfilename, flags, local_mode)