Surface exception from metadata credentails plugin methods

pull/19174/head
Lidi Zheng 6 years ago
parent e553590a0a
commit d835d1bb1f
  1. 4
      src/python/grpcio/grpc/_cython/_cygrpc/credentials.pxd.pxi
  2. 4
      src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
  3. 4
      src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi

@ -26,9 +26,9 @@ cdef int _get_metadata(
grpc_credentials_plugin_metadata_cb cb, void *user_data,
grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX],
size_t *num_creds_md, grpc_status_code *status,
const char **error_details) with gil
const char **error_details) except * with gil
cdef void _destroy(void *state) with gil
cdef void _destroy(void *state) except * with gil
cdef class MetadataPluginCallCredentials(CallCredentials):

@ -42,7 +42,7 @@ cdef int _get_metadata(
grpc_credentials_plugin_metadata_cb cb, void *user_data,
grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX],
size_t *num_creds_md, grpc_status_code *status,
const char **error_details) with gil:
const char **error_details) except * with gil:
cdef size_t metadata_count
cdef grpc_metadata *c_metadata
def callback(metadata, grpc_status_code status, bytes error_details):
@ -57,7 +57,7 @@ cdef int _get_metadata(
return 0 # Asynchronous return
cdef void _destroy(void *state) with gil:
cdef void _destroy(void *state) except * with gil:
cpython.Py_DECREF(<object>state)
grpc_shutdown_blocking()

@ -546,8 +546,8 @@ cdef extern from "grpc/grpc_security.h":
grpc_credentials_plugin_metadata_cb cb, void *user_data,
grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX],
size_t *num_creds_md, grpc_status_code *status,
const char **error_details)
void (*destroy)(void *state)
const char **error_details) except *
void (*destroy)(void *state) except *
void *state
const char *type

Loading…
Cancel
Save