diff options
author | Ken Payson <kpayson@google.com> | 2016-09-18 22:49:03 -0700 |
---|---|---|
committer | Ken Payson <kpayson@google.com> | 2016-09-19 14:16:24 -0700 |
commit | 63d8af2b0043ccbff04cf3f6bac0e58aba06f257 (patch) | |
tree | 184d1a9560bed16136b1cc35e22591a81aae812c /src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi | |
parent | 1b5f057995fb2b53746db281ae519d9ae475d24c (diff) |
Add parameter for server options
Diffstat (limited to 'src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi')
-rw-r--r-- | src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi index 3df937eb14..73d1ff7b97 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi @@ -32,15 +32,16 @@ cimport cpython cdef class Channel: - def __cinit__(self, bytes target, ChannelArgs arguments=None, + def __cinit__(self, bytes target, ChannelArgs arguments, ChannelCredentials channel_credentials=None): grpc_init() cdef grpc_channel_args *c_arguments = NULL cdef char *c_target = NULL self.c_channel = NULL self.references = [] - if arguments is not None: + if len(arguments) > 0: c_arguments = &arguments.c_args + self.references.append(arguments) c_target = target if channel_credentials is None: with nogil: |