aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@users.noreply.github.com>2016-06-10 13:06:50 -0700
committerGravatar GitHub <noreply@github.com>2016-06-10 13:06:50 -0700
commitdfbee48de0a2020a4eb80df4755a375d606e72af (patch)
tree7d387de0b385cd629f9611f81a719d2ca13810cb /src/python
parent698d3e91ff42db3fe640cc369e8edf85abc5343d (diff)
parent5f8ad8954554369e262960449b204dc5b626b0f8 (diff)
Merge pull request #6853 from nathanielmanistaatgoogle/operationtyple-equals-equals
Use == instead of is for cygrpc.OperationType values
Diffstat (limited to 'src/python')
-rw-r--r--src/python/grpcio/grpc/_channel.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/python/grpcio/grpc/_channel.py b/src/python/grpcio/grpc/_channel.py
index d9eb5a4b77..7127110b09 100644
--- a/src/python/grpcio/grpc/_channel.py
+++ b/src/python/grpcio/grpc/_channel.py
@@ -134,9 +134,9 @@ def _handle_event(event, state, response_deserializer):
for batch_operation in event.batch_operations:
operation_type = batch_operation.type
state.due.remove(operation_type)
- if operation_type is cygrpc.OperationType.receive_initial_metadata:
+ if operation_type == cygrpc.OperationType.receive_initial_metadata:
state.initial_metadata = batch_operation.received_metadata
- elif operation_type is cygrpc.OperationType.receive_message:
+ elif operation_type == cygrpc.OperationType.receive_message:
serialized_response = batch_operation.received_message.bytes()
if serialized_response is not None:
response = _common.deserialize(
@@ -146,7 +146,7 @@ def _handle_event(event, state, response_deserializer):
_abort(state, grpc.StatusCode.INTERNAL, details)
else:
state.response = response
- elif operation_type is cygrpc.OperationType.receive_status_on_client:
+ elif operation_type == cygrpc.OperationType.receive_status_on_client:
state.trailing_metadata = batch_operation.received_metadata
if state.code is None:
code = _common.CYGRPC_STATUS_CODE_TO_STATUS_CODE.get(