sfi.py resources outputs rspec only if no file specified
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Fri, 22 Oct 2010 10:50:02 +0000 (12:50 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Fri, 22 Oct 2010 10:50:02 +0000 (12:50 +0200)
sfa/client/sfi.py

index 1c49dc9..553e256 100755 (executable)
@@ -798,8 +798,9 @@ class Sfi:
             creds.append(delegated_cred) 
         result = server.ListResources(creds, call_options)
         format = opts.format
-        display_rspec(result, format)
-        if (opts.file is not None):
+        if opts.file is None:
+            display_rspec(result, format)
+        else:
             file = opts.file
             if not file.startswith(os.sep):
                 file = os.path.join(self.options.sfi_dir, file)