minor: fix save_rspec_to_file in sfi.py
[sfa.git] / sfa / client / sfi.py
index a51dc76..2f47839 100644 (file)
@@ -138,7 +138,7 @@ def save_rspec_to_file(rspec, filename):
     if not filename.endswith(".rspec"):
         filename = filename + ".rspec"
     f = open(filename, 'w')
-    f.write(rspec)
+    f.write("%s"%rspec)
     f.close()
     return
 
@@ -1095,7 +1095,7 @@ use this if you mean an authority instead""")
         if self.options.raw:
             save_raw_to_file(result, self.options.raw, self.options.rawformat, self.options.rawbanner)
         if options.file is not None:
-            save_rspec_to_file(value, options.file)
+            save_rspec_to_file(value['geni_rspec'], options.file)
         if (self.options.raw is None) and (options.file is None):
             display_rspec(value, options.format)
 
@@ -1136,7 +1136,7 @@ use this if you mean an authority instead""")
         if self.options.raw:
             save_raw_to_file(result, self.options.raw, self.options.rawformat, self.options.rawbanner)
         if options.file is not None:
-            save_rspec_to_file(value, options.file)
+            save_rspec_to_file(value['geni_rspec'], options.file)
         if (self.options.raw is None) and (options.file is None):
             display_rspec(value, options.format)
 
@@ -1221,7 +1221,7 @@ use this if you mean an authority instead""")
         if self.options.raw:
             save_raw_to_file(result, self.options.raw, self.options.rawformat, self.options.rawbanner)
         if options.file is not None:
-            save_rspec_to_file (value, options.file)
+            save_rspec_to_file (value['geni_rspec'], options.file)
         if (self.options.raw is None) and (options.file is None):
             print value
         return value
@@ -1281,7 +1281,7 @@ use this if you mean an authority instead""")
         if self.options.raw:
             save_raw_to_file(result, self.options.raw, self.options.rawformat, self.options.rawbanner)
         if options.file is not None:
-            save_rspec_to_file (value, options.file)
+            save_rspec_to_file (value['geni_rspec'], options.file)
         if (self.options.raw is None) and (options.file is None):
             print value
         return value