1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-09 09:13:23 +00:00

dont try to create empty dirs

This commit is contained in:
Kevin McCarthy
2013-08-10 17:08:57 -10:00
parent a1229190f5
commit fcc50eb44e

View File

@@ -37,7 +37,7 @@ def load_cassette(cassette_path):
def save_cassette(cassette_path, requests, responses):
dirname, filename = os.path.split(cassette_path)
if not os.path.exists(dirname):
if dirname and not os.path.exists(dirname):
os.makedirs(dirname)
data = _serialize_cassette(requests, responses)
data = yaml.dump(data, Dumper=Dumper)