Source code for kappa_sdk.script_result

from typing import Optional


[docs] class ScriptResult: """ KW script run result. Returned by the :meth:`Connection.run_kw_script`, this object tells whether the KW script was successfully run, and contains error information (if any). .. note:: Should not be instantiated directly. """ def __init__(self, is_success: bool, message: Optional[str]): self.__is_success: bool = is_success self.__message: str = '' if message is None else message @property def is_success(self) -> bool: """ Gets a value indicating whether the KW script was successfully run. """ return self.__is_success @property def message(self) -> str: """ Gets the error message, if any. """ return self.__message