fix formatting issues

pull/22638/head
Taras Galkovskyi 5 years ago
parent 4413d412e2
commit 486e27e2de
  1. 14
      examples/python/data_transmission/BUILD
  2. 3
      examples/python/data_transmission/alts_client.py
  3. 2
      src/python/grpcio_tests/tests/interop/server.py

@ -16,17 +16,17 @@ licenses(["notice"]) # 3-clause BSD
load("@grpc_python_dependencies//:requirements.bzl", "requirement")
py_binary(
py_binary(
name = "alts_server",
python_version = "PY3",
srcs_version = "PY2AND3",
main = "alts_server.py",
srcs = [
"alts_server.py",
"demo_pb2.py",
"demo_pb2_grpc.py",
"server.py",
],
main = "alts_server.py",
python_version = "PY3",
srcs_version = "PY2AND3",
deps = [
"//src/python/grpcio/grpc:grpcio",
],
@ -34,15 +34,15 @@ py_binary(
py_binary(
name = "alts_client",
python_version = "PY3",
srcs_version = "PY2AND3",
main = "alts_client.py",
srcs = [
"alts_client.py",
"client.py",
"demo_pb2.py",
"demo_pb2_grpc.py",
],
main = "alts_client.py",
python_version = "PY3",
srcs_version = "PY2AND3",
deps = [
"//src/python/grpcio/grpc:grpcio",
],

@ -23,7 +23,8 @@ import demo_pb2_grpc
SERVER_ADDRESS = "localhost:23333"
def main():
with grpc.secure_channel(SERVER_ADDRESS, credentials=grpc.alts_channel_credentials()) as channel:
with grpc.secure_channel(
SERVER_ADDRESS, credentials=grpc.alts_channel_credentials()) as channel:
stub = demo_pb2_grpc.GRPCDemoStub(channel)
client.simple_method(stub)
client.client_streaming_method(stub)

@ -63,7 +63,7 @@ def serve():
test_pb2_grpc.add_TestServiceServicer_to_server(service.TestService(),
server)
if args.use_tls or args.use_alts:
credentials = get_server_credentials(use_tls)
credentials = get_server_credentials(args.use_tls)
server.add_secure_port('[::]:{}'.format(args.port), credentials)
else:
server.add_insecure_port('[::]:{}'.format(args.port))

Loading…
Cancel
Save