mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-08 16:53:23 +00:00
Update filesystem.py
fix WindowsError: [Error 32]. because must close the file before rename the file in window system.
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user