#NEWLINE# def hashActionAnnotations( self ) : #NEWLINE# #INDENT# action_annotations = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for ( id , annotations ) in [ [ action . db_id , action . db_annotations ] for action in self . db_actions ] : #NEWLINE# #INDENT# for annotation in annotations : #NEWLINE# #INDENT# index = ( str ( id ) , annotation . db_key ) #NEWLINE# if ( index not in action_annotations ) : #NEWLINE# #INDENT# action_annotations [ index ] = [ ] #NEWLINE# #UNINDENT# if ( annotation . db_value not in action_annotations [ index ] ) : #NEWLINE# #INDENT# action_annotations [ index ] . append ( annotation . db_value ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# keys = action_annotations . keys ( ) #NEWLINE# keys . sort ( ) #NEWLINE# m = hashlib . md5 ( ) #NEWLINE# for k in keys : #NEWLINE# #INDENT# m . update ( ( k [ 0 ] + k [ 1 ] ) ) #NEWLINE# action_annotations [ k ] . sort ( ) #NEWLINE# for v in action_annotations [ k ] : #NEWLINE# #INDENT# m . update ( v ) #NEWLINE# #UNINDENT# #UNINDENT# return m . hexdigest ( )