diff options
author | Paul Petit <paul.petit@cybelangel.com> | 2018-08-16 11:35:30 +0200 |
---|---|---|
committer | Paul Petit <paul.petit@cybelangel.com> | 2018-08-16 11:35:30 +0200 |
commit | 33e5c0d0912900ed9c1fab8c144f5fca67120378 (patch) | |
tree | 76429a11969549e1076e124d471b5594646648d2 /src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi | |
parent | 8a86f5329e07ee90b832195dac7b1d88637bec39 (diff) |
Replace is by == for a status comparison
This worked fine with CPython, but the condition
was always evaluated to False with Pypy, causing
bugs down the road.
Tested with Pypy 6.0.
Diffstat (limited to 'src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi')
-rw-r--r-- | src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi index d2c0389ca6..0a25218e19 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi @@ -48,7 +48,7 @@ cdef int _get_metadata( cdef size_t metadata_count cdef grpc_metadata *c_metadata def callback(metadata, grpc_status_code status, bytes error_details): - if status is StatusCode.ok: + if status == StatusCode.ok: _store_c_metadata(metadata, &c_metadata, &metadata_count) cb(user_data, c_metadata, metadata_count, status, NULL) _release_c_metadata(c_metadata, metadata_count) |