]> khamidou — GitHub mirrors - vcrpy.git/commitdiff
PEP8 cleanup and make files.py work in python2.5
authorKevin McCarthy <me@kevinmccarthy.org>
Thu, 31 May 2012 09:11:14 +0000 (23:11 -1000)
committerKevin McCarthy <me@kevinmccarthy.org>
Thu, 31 May 2012 09:11:14 +0000 (23:11 -1000)
vcr/files.py

index 7e036c03e493d9437b38f3caa6b483c99a008eb0..3864ccf0d9fd7ba791a7d1b577928599324af144 100644 (file)
@@ -1,17 +1,18 @@
+from __future__ import with_statement
 import os
 import yaml
 
+
 def load_cassette(cassette_path):
     try:
         return yaml.load(open(cassette_path))
     except IOError:
         return None
 
-def save_cassette(cassette_path,cassette):
-    dirname,filename = os.path.split(cassette_path)
+
+def save_cassette(cassette_path, cassette):
+    dirname, filename = os.path.split(cassette_path)
     if not os.path.exists(dirname):
         os.makedirs(dirname)
-    with open(cassette_path,'wc') as cassette_file:
+    with open(cassette_path, 'wc') as cassette_file:
         cassette_file.write(cassette.serialize())
-
-