Fix create_[secure/insecure]_channel argument order

pull/6881/head
Ken Payson 9 years ago
parent 68e5ecbee4
commit f24665fdd8
  1. 4
      src/python/grpcio/grpc/__init__.py
  2. 4
      src/python/grpcio/tests/unit/beta/test_utilities.py

@ -1059,7 +1059,7 @@ def insecure_channel(target, options=None):
A Channel to the target through which RPCs may be conducted.
"""
from grpc import _channel
return _channel.Channel(target, None, options)
return _channel.Channel(target, options, None)
def secure_channel(target, credentials, options=None):
@ -1075,7 +1075,7 @@ def secure_channel(target, credentials, options=None):
A Channel to the target through which RPCs may be conducted.
"""
from grpc import _channel
return _channel.Channel(target, credentials, options)
return _channel.Channel(target, options, credentials)
def server(generic_rpc_handlers, thread_pool, options=None):

@ -50,6 +50,6 @@ def not_really_secure_channel(
"""
target = '%s:%d' % (host, port)
channel = grpc.secure_channel(
target, ((b'grpc.ssl_target_name_override', server_host_override,),),
channel_credentials._credentials)
target, channel_credentials._credentials,
((b'grpc.ssl_target_name_override', server_host_override,),))
return implementations.Channel(channel)

Loading…
Cancel
Save