def __init__(self, command_name, command_params, success, result_or_error):

        super(SyncCommandResult, self).__init__(command_name,
                                                command_params)

        if isinstance(result_or_error, (bytes, six.text_type)):
            result_key = 'result' if success else 'error'
            result_or_error = {result_key: result_or_error}

        if success:
            self.command_status = AgentCommandStatus.SUCCEEDED
            self.command_result = result_or_error
        else:
            self.command_status = AgentCommandStatus.FAILED
            self.command_error = result_or_error
Construct an instance of SyncCommandResult.
dataset/ETHPy150Open openstack/ironic-python-agent/ironic_python_agent/extensions/base.py/SyncCommandResult.__init__