show warning message when deleting an expired credential
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 11 Jul 2012 14:09:05 +0000 (16:09 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 11 Jul 2012 14:09:05 +0000 (16:09 +0200)
also pass right logger to SfaClientBootstrap so the msg shows up

sfa/client/sfaclientlib.py
sfa/client/sfi.py

index 2d38921..521a220 100644 (file)
@@ -295,6 +295,7 @@ class SfaClientBootstrap:
                         return filename
                     else:
                         # remove invalid file
+                        self.logger.warning ("Removing %s - has expired"%filename)
                         os.unlink(filename) 
                 try:
                     produce_method (self, filename, *args, **kw)
index 9fc372e..8fa380b 100644 (file)
@@ -608,7 +608,8 @@ class Sfi:
     
     # init self-signed cert, user credentials and gid
     def bootstrap (self):
-        client_bootstrap = SfaClientBootstrap (self.user, self.reg_url, self.options.sfi_dir)
+        client_bootstrap = SfaClientBootstrap (self.user, self.reg_url, self.options.sfi_dir,
+                                               logger=self.logger)
         # if -k is provided, use this to initialize private key
         if self.options.user_private_key:
             client_bootstrap.init_private_key_if_missing (self.options.user_private_key)