#NEWLINE# def save_messages( self , msgs ) : #NEWLINE# #INDENT# msg_ids = [ '.' . join ( msg [ 'id' ] ) for msg in msgs ] #NEWLINE# cache . set ( ( 'validation.job_id:%s' % self . job_id ) , msg_ids ) #NEWLINE# for ( msg , key ) in zip ( msgs , msg_ids ) : #NEWLINE# #INDENT# if isinstance ( msg [ 'description' ] , list ) : #NEWLINE# #INDENT# des = [ ] #NEWLINE# for _m in msg [ 'description' ] : #NEWLINE# #INDENT# if isinstance ( _m , list ) : #NEWLINE# #INDENT# for x in _m : #NEWLINE# #INDENT# des . append ( x ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# des . append ( _m ) #NEWLINE# #UNINDENT# #UNINDENT# des = '; ' . join ( des ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# des = msg [ 'description' ] #NEWLINE# #UNINDENT# cache . set ( ( 'validation.msg_key:' + key ) , { #NEWLINE# #INDENT# 'long_message' : des , #NEWLINE# 'message' : msg [ 'message' ] , #NEWLINE# 'type' : msg . get ( 'compatibility_type' , msg . get ( 'type' ) ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# aa = ( 'validation.job_id:%s.msg_key:%s:addons_affected' % ( self . job_id , key ) ) #NEWLINE# try : #NEWLINE# #INDENT# cache . incr ( aa ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# cache . set ( aa , 1 )