#NEWLINE# def __init__( self , command_name , command_params , success , result_or_error ) : #NEWLINE# #INDENT# 'Construct an instance of SyncCommandResult.\n\n        :param command_name: name of command executed\n        :param command_params: parameters passed to command\n        :param success: True indicates success, False indicates failure\n        :param result_or_error: Contains the result (or error) from the command\n        ' #NEWLINE# super ( SyncCommandResult , self ) . __init__ ( command_name , command_params ) #NEWLINE# if isinstance ( result_or_error , ( bytes , six . text_type ) ) : #NEWLINE# #INDENT# result_key = ( 'result' if success else 'error' ) #NEWLINE# result_or_error = { #NEWLINE# #INDENT# result_key : result_or_error , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# if success : #NEWLINE# #INDENT# self . command_status = AgentCommandStatus . SUCCEEDED #NEWLINE# self . command_result = result_or_error #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . command_status = AgentCommandStatus . FAILED #NEWLINE# self . command_error = result_or_error