mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-11 11:46:02 +00:00
Don't overwrite builtin
This commit is contained in:
parent
f33b667b24
commit
d3752baf60
1 changed files with 2 additions and 2 deletions
|
|
@ -37,9 +37,9 @@ class safe_write(object):
|
|||
self.write = f.write
|
||||
return self
|
||||
|
||||
def __exit__(self, type, value, tb):
|
||||
def __exit__(self, cls, value, tb):
|
||||
self.f.close()
|
||||
if type is None:
|
||||
if cls is None:
|
||||
os.rename(self.tmppath, self.fpath)
|
||||
else:
|
||||
os.remove(self.tmppath)
|
||||
|
|
|
|||
Loading…
Reference in a new issue