aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/python/interceptors/headers/header_manipulator_client_interceptor.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/python/interceptors/headers/header_manipulator_client_interceptor.py')
-rw-r--r--examples/python/interceptors/headers/header_manipulator_client_interceptor.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/examples/python/interceptors/headers/header_manipulator_client_interceptor.py b/examples/python/interceptors/headers/header_manipulator_client_interceptor.py
index ac7c605144..89b1bef05f 100644
--- a/examples/python/interceptors/headers/header_manipulator_client_interceptor.py
+++ b/examples/python/interceptors/headers/header_manipulator_client_interceptor.py
@@ -20,9 +20,10 @@ import generic_client_interceptor
class _ClientCallDetails(
- collections.namedtuple('_ClientCallDetails',
- ('method', 'timeout', 'metadata',
- 'credentials')), grpc.ClientCallDetails):
+ collections.namedtuple(
+ '_ClientCallDetails',
+ ('method', 'timeout', 'metadata', 'credentials')),
+ grpc.ClientCallDetails):
pass
@@ -33,7 +34,10 @@ def header_adder_interceptor(header, value):
metadata = []
if client_call_details.metadata is not None:
metadata = list(client_call_details.metadata)
- metadata.append((header, value,))
+ metadata.append((
+ header,
+ value,
+ ))
client_call_details = _ClientCallDetails(
client_call_details.method, client_call_details.timeout, metadata,
client_call_details.credentials)