Skip to content

Commit 14bf2b2

Browse files
authored
Fix raising BaseException bug (milvus-io#866)
fixes: milvus-io/milvus#15236 Signed-off-by: XuanYang-cn <[email protected]>
1 parent 623d421 commit 14bf2b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pymilvus/client/grpc_handler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ def _wait_for_channel_ready(self):
9090
grpc.channel_ready_future(self._channel).result(timeout=3)
9191
return
9292
except grpc.FutureTimeoutError:
93-
raise BaseException(f'Fail connecting to server on {self._uri}. Timeout')
93+
raise BaseException(Status.CONNECT_FAILED, f'Fail connecting to server on {self._uri}. Timeout')
9494

95-
raise BaseException(f'Please setup grpc channel first')
95+
raise BaseException(Status.CONNECT_FAILED, 'No channel in handler, please setup grpc channel first')
9696

9797
def close(self):
9898
self._channel.close()

0 commit comments

Comments
 (0)