#NEWLINE# def task_load_row( row ) : #NEWLINE# #INDENT# row [ 'data' ] = json . safe_loads ( ( row . data or '' ) , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# row [ 'steps' ] = json . safe_loads ( ( row . steps or '' ) , [ ] ) #NEWLINE# for step in row . steps : #NEWLINE# #INDENT# if ( 'start' in step ) : #NEWLINE# #INDENT# step [ 'start' ] = parser . parse ( step [ 'start' ] ) #NEWLINE# #UNINDENT# if ( 'stop' in step ) : #NEWLINE# #INDENT# step [ 'stop' ] = parser . parse ( step [ 'stop' ] ) #NEWLINE# #UNINDENT# #UNINDENT# if ( ( 'state' in row ) and ( row . state in TaskState ) ) : #NEWLINE# #INDENT# row [ 'state' ] = TaskState [ row . state ] #NEWLINE# #UNINDENT# return row