bugfix in sfi when running the discover subcommand
[sfa.git] / sfa / client / sfi.py
index c0f1e41..bfff3d3 100644 (file)
@@ -1186,7 +1186,7 @@ use this if you mean an authority instead""")
 
         server = self.sliceapi()
         # set creds
-        creds = [self.my_credential]
+        creds = [self.my_credential_string]
         if options.delegate:
             creds.append(self.delegate_cred(cred, get_authority(self.authority)))
         if options.show_credential:
@@ -1776,7 +1776,7 @@ $ sfi m -b http://mymanifold.foo.com:7080/
             filename = os.path.join( self.options.sfi_dir,
                                       "{}.{}_for_{}.{}.cred"\
                                       .format(hrn, htype, delegatee_hrn, delegatee_type))
-            with file(filename, 'w') as f:
+            with open(filename, 'w') as f:
                 f.write(delegated_credential)
             self.logger.debug("(Over)wrote {}".format(filename))
             hrn_delegated_credentials.append((hrn, htype, delegated_credential, filename, ))