Fix Python example unary/stream conflict

This commit is contained in:
Mehrdad Afshari 2018-02-05 15:06:26 -08:00
Родитель 6b676e7b88
Коммит 6d13712d07
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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,