smoothen error handling
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Tue, 2 Oct 2018 19:33:17 +0000 (21:33 +0200)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Tue, 2 Oct 2018 19:36:15 +0000 (21:36 +0200)
sfa/trust/auth.py

index f8ac90f..b481bbd 100644 (file)
@@ -68,6 +68,8 @@ class Auth:
         error = (None, None)
 
         def log_invalid_cred(cred, exception):
+            if isinstance(cred, dict) and 'geni_value' in cred:
+                cred = cred['geni_value']
             if not isinstance(cred, StringType):
                 logger.info(
                     "{}: cannot validate credential {}"