diff --git a/RPyCRobotRemote/RPyCRobotRemoteClient.py b/RPyCRobotRemote/RPyCRobotRemoteClient.py index 2472851..5ca4c6f 100644 --- a/RPyCRobotRemote/RPyCRobotRemoteClient.py +++ b/RPyCRobotRemote/RPyCRobotRemoteClient.py @@ -114,6 +114,7 @@ def __init__(self, # automatic redirect stdout + stderr from remote during # during handling of sync_request + self._connected = True self._client._redirected = False self._client.sync_request = redirect_output(self._client.sync_request) # pylint: enable=R0913 @@ -123,7 +124,8 @@ def __doc__(self): return getattr(self._client.root.library, '__doc__') def __getattr__(self, name: str): - if name[0:1] != '_': + if (name[0:1] != '_' and + (not name.startswith('ROBOT_LIBRARY_') or self._connected)): try: obj = getattr(self._client.root.library, name) except AttributeError: @@ -139,6 +141,7 @@ def stop_remote_server(self): """Stop remote server.""" self._client.root.stop_remote_server() self._client.close() + self._connected = False @not_keyword def get_keyword_names(self):