From 833df2b6c854d63be6931179d250e2099521b0a6 Mon Sep 17 00:00:00 2001 From: Pau Freixes Date: Tue, 7 Jan 2020 00:55:59 +0100 Subject: [PATCH] Apply feedback --- src/python/grpcio/grpc/experimental/aio/_interceptor.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/python/grpcio/grpc/experimental/aio/_interceptor.py b/src/python/grpcio/grpc/experimental/aio/_interceptor.py index 205a710b249..2476310fff0 100644 --- a/src/python/grpcio/grpc/experimental/aio/_interceptor.py +++ b/src/python/grpcio/grpc/experimental/aio/_interceptor.py @@ -129,10 +129,8 @@ class InterceptedUnaryUnaryCall(_base_call.UnaryUnaryCall): interceptors: Iterator[UnaryUnaryClientInterceptor], client_call_details: ClientCallDetails, request: RequestType) -> _base_call.UnaryUnaryCall: - try: - interceptor = next(interceptors) - except StopIteration: - interceptor = None + + interceptor = next(interceptors, None) if interceptor: continuation = functools.partial(_run_interceptor, interceptors)