File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -1076,11 +1076,8 @@ def id(self):
1076
1076
1077
1077
def authn_info (self ):
1078
1078
res = []
1079
- for statement in self .assertion .authn_statement :
1080
- try :
1081
- authn_instant = statement .authn_instant
1082
- except AttributeError :
1083
- authn_instant = ""
1079
+ for statement in getattr (self .assertion , 'authn_statement' , []):
1080
+ authn_instant = getattr (statement , "authn_instant" , "" )
1084
1081
1085
1082
context = statement .authn_context
1086
1083
if not context :
@@ -1094,10 +1091,10 @@ def authn_info(self):
1094
1091
except AttributeError :
1095
1092
authn_class = ""
1096
1093
1097
- try :
1098
- authn_auth = [ a . text for a in context . authenticating_authority ]
1099
- except AttributeError :
1100
- authn_auth = [ ]
1094
+ authenticating_authorities = getattr (
1095
+ context , "authenticating_authority" , [ ]
1096
+ )
1097
+ authn_auth = [ authority . text for authority in authenticating_authorities ]
1101
1098
1102
1099
res .append ((authn_class , authn_auth , authn_instant ))
1103
1100
return res
You can’t perform that action at this time.
0 commit comments