diff --git a/python/examples/grpc_impl_example/fit_a_line/test_timeout_client.py b/python/examples/grpc_impl_example/fit_a_line/test_timeout_client.py index f90fab38533aabf3daa7627ee0b79c56892444dd..fcafaa34f442ad2fb4e66e31accab98caa409e65 100644 --- a/python/examples/grpc_impl_example/fit_a_line/test_timeout_client.py +++ b/python/examples/grpc_impl_example/fit_a_line/test_timeout_client.py @@ -26,9 +26,10 @@ x = [ ] for i in range(3): fetch_map = client.predict(feed={"x": x}, fetch=["price"]) - if fetch_map["serving_status_code"] == 0: + if fetch_map["serving_grpc_error"] == 0: print(fetch_map) - elif fetch_map["serving_status_code"] == grpc.StatusCode.DEADLINE_EXCEEDED: + elif fetch_map["serving_grpc_error"].code( + ) == grpc.StatusCode.DEADLINE_EXCEEDED: print('timeout') else: - print(fetch_map["serving_status_code"]) + print(fetch_map["serving_grpc_error"])