From d3752baf604311145ee664b9ec9a6b8356470385 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Thu, 15 May 2014 16:26:51 +0200 Subject: [PATCH] Don't overwrite builtin --- vdirsyncer/storage/filesystem.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vdirsyncer/storage/filesystem.py b/vdirsyncer/storage/filesystem.py index 08b0cab..98aa6d4 100644 --- a/vdirsyncer/storage/filesystem.py +++ b/vdirsyncer/storage/filesystem.py @@ -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)