From: Thierry Parmentelat Date: Fri, 5 Feb 2016 16:27:02 +0000 (+0100) Subject: sfi myslice more robust - won't fail when one slice is problematic X-Git-Tag: sfa-3.1-21~37 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=7873db2078703ec92fc05b90fecf1ada396828ae sfi myslice more robust - won't fail when one slice is problematic --- diff --git a/sfa/client/sfi.py b/sfa/client/sfi.py index 3588e3eb..238db2d0 100644 --- a/sfa/client/sfi.py +++ b/sfa/client/sfi.py @@ -1758,7 +1758,11 @@ $ sfi m -b http://mymanifold.foo.com:7080/ for auth_hrn in my_auths: hrn_credentials.append ( (auth_hrn, 'auth', self.authority_credential_string(auth_hrn),) ) for slice_hrn in my_slices: - hrn_credentials.append ( (slice_hrn, 'slice', self.slice_credential_string (slice_hrn),) ) + try: + hrn_credentials.append ( (slice_hrn, 'slice', self.slice_credential_string (slice_hrn),) ) + except: + print("WARNING: could not get slice credential for slice {}" + .format(slice_hrn)) # (e) check for the delegated version of these # xxx todo add an option -a/-A? like for 'sfi delegate' for when we ever