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):
10761076
10771077 def authn_info (self ):
10781078 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" , "" )
10841081
10851082 context = statement .authn_context
10861083 if not context :
@@ -1094,10 +1091,10 @@ def authn_info(self):
10941091 except AttributeError :
10951092 authn_class = ""
10961093
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 ]
11011098
11021099 res .append ((authn_class , authn_auth , authn_instant ))
11031100 return res
You can’t perform that action at this time.
0 commit comments