#NEWLINE# def execution_changed( self , wf_item , execution ) : #NEWLINE# #INDENT# if ( not execution ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# self . execution = execution #NEWLINE# self . parentItem = wf_item #NEWLINE# text = '' #NEWLINE# if ( hasattr ( execution , 'item' ) and ( not ( execution . item == self . executionList . currentItem ( ) ) ) ) : #NEWLINE# #INDENT# self . executionList . setCurrentItem ( execution . item ) #NEWLINE# #UNINDENT# if hasattr ( execution , 'item' ) : #NEWLINE# #INDENT# text += ( '%s\n' % execution . item . text ( 0 ) ) #NEWLINE# #UNINDENT# text += ( 'Start: %s\n' % execution . ts_start ) #NEWLINE# text += ( 'End: %s\n' % execution . ts_end ) #NEWLINE# if hasattr ( execution , 'user' ) : #NEWLINE# #INDENT# text += ( 'User: %s\n' % annotation . user ) #NEWLINE# #UNINDENT# if hasattr ( execution , 'cached' ) : #NEWLINE# #INDENT# text += ( 'Cached: %s\n' % ( 'Yes' if execution . cached else 'No' ) ) #NEWLINE# #UNINDENT# if hasattr ( execution , 'completed' ) : #NEWLINE# #INDENT# text += ( 'Completed: %s\n' % { #NEWLINE# #INDENT# '0' : 'No' , #NEWLINE# '1' : 'Yes' , #NEWLINE# #UNINDENT# } . get ( str ( execution . completed ) , 'No' ) ) #NEWLINE# #UNINDENT# if ( hasattr ( execution , 'error' ) and execution . error ) : #NEWLINE# #INDENT# text += ( 'Error: %s\n' % execution . error ) #NEWLINE# #UNINDENT# annotations = ( execution . db_annotations if hasattr ( execution , 'db_annotations' ) else [ ] ) #NEWLINE# if len ( annotations ) : #NEWLINE# #INDENT# text += '\n\nAnnotations:' #NEWLINE# for annotation in annotations : #NEWLINE# #INDENT# text += ( '\n  %s: %s' % ( annotation . key , annotation . value ) ) #NEWLINE# #UNINDENT# #UNINDENT# self . detailsWidget . setText ( text ) #NEWLINE# self . update_selection ( )