mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-08 16:53:23 +00:00
12 lines
317 B
Python
12 lines
317 B
Python
import os
|
|
|
|
|
|
class FilesystemPersister(object):
|
|
@classmethod
|
|
def write(cls, cassette_path, data):
|
|
dirname, filename = os.path.split(cassette_path)
|
|
if dirname and not os.path.exists(dirname):
|
|
os.makedirs(dirname)
|
|
with open(cassette_path, 'w') as f:
|
|
f.write(data)
|