#NEWLINE# def add_metadata( self , _environ , identity ) : #NEWLINE# #INDENT# key = identity . get ( 'repoze.who.userid' ) #NEWLINE# try : #NEWLINE# #INDENT# if self . key_attribute : #NEWLINE# #INDENT# for sec in self . users . sections ( ) : #NEWLINE# #INDENT# if self . users . has_option ( sec , sec . key_attribute ) : #NEWLINE# #INDENT# if ( key in self . users . get ( sec , self . key_attribute ) ) : #NEWLINE# #INDENT# identity [ 'user' ] = dict ( self . users . items ( sec ) ) #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# identity [ 'user' ] = dict ( self . users . items ( key ) ) #NEWLINE# #UNINDENT# #UNINDENT# except ValueError : #NEWLINE# #INDENT# pass