Skip to content

Commit edc81ba

Browse files
Change port variable
1 parent abbd27b commit edc81ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pydgraph/client_slash.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,16 @@ def __init__(self, slash_end_point, api_key):
3636

3737
self._slash_end_point = slash_end_point
3838
self._api_key = api_key
39+
self._port = "443"
3940

4041
def get_stub(self):
4142
"""Returns Dgraph Client stub for the Slash GraphQL endpoint"""
4243
url = self._slash_end_point.replace("/graphql", "")
4344
url = url.replace("https://", "")
4445
url_parts = url.split(".", 1)
4546
host = url_parts[0] + ".grpc." + url_parts[1]
46-
PORT = "443"
4747
creds = grpc.ssl_channel_credentials()
4848
call_credentials = grpc.metadata_call_credentials(lambda context, callback: callback((("authorization", self._api_key),), None))
4949
composite_credentials = grpc.composite_channel_credentials(creds, call_credentials)
50-
client_stub = pydgraph.DgraphClientStub('{host}:{port}'.format(host=host, port=PORT), composite_credentials, options=(('grpc.enable_http_proxy', 0),))
50+
client_stub = pydgraph.DgraphClientStub('{host}:{port}'.format(host=host, port=self._port), composite_credentials, options=(('grpc.enable_http_proxy', 0),))
5151
return client_stub

0 commit comments

Comments
 (0)