]> khamidou — GitHub mirrors - vcrpy.git/commitdiff
dont append to cassette file
authorKevin McCarthy <me@kevinmccarthy.org>
Tue, 6 Aug 2013 08:17:28 +0000 (22:17 -1000)
committerKevin McCarthy <me@kevinmccarthy.org>
Mon, 12 Aug 2013 01:05:40 +0000 (15:05 -1000)
vcr/files.py

index 58611bd8313dbf575a45ae00b74ac66cd7a2c1e7..59ac42854b62f62babcb508e9657e17d1c6bd360 100644 (file)
@@ -15,5 +15,5 @@ def save_cassette(cassette_path, data):
     dirname, filename = os.path.split(cassette_path)
     if not os.path.exists(dirname):
         os.makedirs(dirname)
-    with open(cassette_path, 'a') as cassette_file:
+    with open(cassette_path, 'w') as cassette_file:
         cassette_file.write(yaml.dump(data, Dumper=Dumper))