diff options
author | 2017-09-28 22:36:31 +0000 | |
---|---|---|
committer | 2017-09-28 22:36:31 +0000 | |
commit | 3e3bbdff917e5c56f6c29bc35c8eb989192325e7 (patch) | |
tree | 02a4abb5f4763c7a22e0b548a0d11bdaddc20e0f /src/python/grpcio | |
parent | 8ba60a7e35663a25726588d223cc90de63af9447 (diff) |
Raise exception instances rather than classes
Diffstat (limited to 'src/python/grpcio')
-rw-r--r-- | src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi index d860173b5d..782a684d25 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi @@ -454,7 +454,7 @@ cdef class _MetadataIterator: self.i = self.i + 1 return result else: - raise StopIteration + raise StopIteration() # TODO(https://github.com/grpc/grpc/issues/7950): Eliminate this; just use an @@ -518,7 +518,7 @@ cdef class MetadataArray: def __getitem__(self, size_t i): if i >= self.c_metadata_array.count: - raise IndexError + raise IndexError() key = _slice_bytes(self.c_metadata_array.metadata[i].key) value = _slice_bytes(self.c_metadata_array.metadata[i].value) return Metadatum(key=key, value=value) @@ -720,7 +720,7 @@ cdef class _OperationsIterator: self.i = self.i + 1 return result else: - raise StopIteration + raise StopIteration() cdef class Operations: |