mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +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
|
self.write = f.write
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def __exit__(self, type, value, tb):
|
def __exit__(self, cls, value, tb):
|
||||||
self.f.close()
|
self.f.close()
|
||||||
if type is None:
|
if cls is None:
|
||||||
os.rename(self.tmppath, self.fpath)
|
os.rename(self.tmppath, self.fpath)
|
||||||
else:
|
else:
|
||||||
os.remove(self.tmppath)
|
os.remove(self.tmppath)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue