SyncFile: open with O_EXCL (or equivalent)

This commit is contained in:
Marian Beermann 2016-06-04 22:47:25 +02:00
parent 62a2a7302e
commit e41f3ecc5b
No known key found for this signature in database
GPG key ID: 9B8450B91D1362C1

View file

@ -75,7 +75,7 @@ class SyncFile:
"""
def __init__(self, path):
self.fd = open(path, 'wb')
self.fd = open(path, 'xb')
self.fileno = self.fd.fileno()
def __enter__(self):