aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/python
diff options
context:
space:
mode:
authorGravatar Mehrdad Afshari <mmx@google.com>2018-02-05 15:06:26 -0800
committerGravatar Mehrdad Afshari <mmx@google.com>2018-02-05 15:06:26 -0800
commit6d13712d07be6e7077041a90ef31842831a730ff (patch)
tree764ac903ad06a0ba5bb82bf517e37115cc03acb4 /examples/python
parent6b676e7b88cfb838fec1b3814d9da3d6540f39ef (diff)
Fix Python example unary/stream conflict
Diffstat (limited to 'examples/python')
-rw-r--r--examples/python/interceptors/headers/generic_client_interceptor.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/python/interceptors/headers/generic_client_interceptor.py b/examples/python/interceptors/headers/generic_client_interceptor.py
index 30b0755aaf..d2bb7e568a 100644
--- a/examples/python/interceptors/headers/generic_client_interceptor.py
+++ b/examples/python/interceptors/headers/generic_client_interceptor.py
@@ -33,14 +33,14 @@ class _GenericClientInterceptor(
request):
new_details, new_request_iterator, postprocess = self._fn(
client_call_details, iter((request,)), False, True)
- response_it = continuation(new_details, new_request_iterator)
+ response_it = continuation(new_details, next(new_request_iterator))
return postprocess(response_it) if postprocess else response_it
def intercept_stream_unary(self, continuation, client_call_details,
request_iterator):
new_details, new_request_iterator, postprocess = self._fn(
client_call_details, request_iterator, True, False)
- response = continuation(new_details, next(new_request_iterator))
+ response = continuation(new_details, new_request_iterator)
return postprocess(response) if postprocess else response
def intercept_stream_stream(self, continuation, client_call_details,