From 16fbe40d878e84086e254c00297712e8e0a218cb Mon Sep 17 00:00:00 2001 From: smallcode <14190635@qq.com> Date: Tue, 22 Oct 2013 17:41:56 +0800 Subject: [PATCH] Update filesystem.py fix WindowsError: [Error 32]. because must close the file before rename the file in window system. --- vcr/persisters/filesystem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcr/persisters/filesystem.py b/vcr/persisters/filesystem.py index ecbd9b7..6a1a275 100644 --- a/vcr/persisters/filesystem.py +++ b/vcr/persisters/filesystem.py @@ -13,7 +13,7 @@ class FilesystemPersister(object): fd, name = tempfile.mkstemp(dir=dirname, prefix=filename) with os.fdopen(fd, 'w') as fout: fout.write(contents) - os.rename(name, path) + os.rename(name, path) @classmethod def write(cls, cassette_path, data):