mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-09 01:03:24 +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)
|
fd, name = tempfile.mkstemp(dir=dirname, prefix=filename)
|
||||||
with os.fdopen(fd, 'w') as fout:
|
with os.fdopen(fd, 'w') as fout:
|
||||||
fout.write(contents)
|
fout.write(contents)
|
||||||
os.rename(name, path)
|
os.rename(name, path)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def write(cls, cassette_path, data):
|
def write(cls, cassette_path, data):
|
||||||
|
|||||||
Reference in New Issue
Block a user