grpc: added set session user call, updated mobility to look for files within new gui as well, fixed pygui issue when start session has a grpc exceptions, showing and empty error window

This commit is contained in:
Blake Harnden 2020-07-16 22:51:26 -07:00
parent 36123e7aa5
commit 6d4434bc12
7 changed files with 66 additions and 23 deletions

View file

@ -414,6 +414,20 @@ class CoreGrpcClient:
request = core_pb2.SetSessionStateRequest(session_id=session_id, state=state)
return self.stub.SetSessionState(request)
def set_session_user(
self, session_id: int, user: str
) -> core_pb2.SetSessionUserResponse:
"""
Set session user, used for helping to find files without full paths.
:param session_id: id of session
:param user: user to set for session
:return: response with result of success or failure
:raises grpc.RpcError: when session doesn't exist
"""
request = core_pb2.SetSessionUserRequest(session_id=session_id, user=user)
return self.stub.SetSessionUser(request)
def add_session_server(
self, session_id: int, name: str, host: str
) -> core_pb2.AddSessionServerResponse: