Skip to content

Commit d42a804

Browse files
Merge pull request #272 from tigergraph/v1.8
V1.8
2 parents ee308c6 + 30fee31 commit d42a804

File tree

4 files changed

+16
-7
lines changed

4 files changed

+16
-7
lines changed

pyTigerGraph/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
from pyTigerGraph.pytgasync.pyTigerGraph import AsyncTigerGraphConnection
33
from pyTigerGraph.common.exception import TigerGraphException
44

5-
__version__ = "1.8.3"
5+
__version__ = "1.8.4"
66

77
__license__ = "Apache 2"

pyTigerGraph/common/base.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,18 @@ def __init__(self, host: str = "http://127.0.0.1", graphname: str = "MyGraph",
168168

169169
restppPort = str(restppPort)
170170
sslPort = str(sslPort)
171-
if self.tgCloud and (restppPort == "9000" or restppPort == "443"):
171+
gsPort = str(gsPort)
172+
if restppPort == gsPort:
173+
self.restppPort = restppPort
174+
self.restppUrl = self.host + ":" + restppPort + "/restpp"
175+
elif self.tgCloud and (restppPort == "9000" or restppPort == "443"):
172176
self.restppPort = sslPort
173177
self.restppUrl = self.host + ":" + sslPort + "/restpp"
174178
else:
175179
self.restppPort = restppPort
176180
self.restppUrl = self.host + ":" + self.restppPort
181+
177182
self.gsPort = ""
178-
gsPort = str(gsPort)
179183
if self.tgCloud and (gsPort == "14240" or gsPort == "443"):
180184
self.gsPort = sslPort
181185
self.gsUrl = self.host + ":" + sslPort

pyTigerGraph/pyTigerGraphBase.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,14 +184,20 @@ def __init__(self, host: str = "http://127.0.0.1", graphname: str = "MyGraph",
184184
raise (TigerGraphException("Incorrect graphname."))
185185

186186
restppPort = str(restppPort)
187+
gsPort = str(gsPort)
187188
sslPort = str(sslPort)
188-
if self.tgCloud and (restppPort == "9000" or restppPort == "443"):
189+
if restppPort == gsPort:
190+
self.restppPort = restppPort
191+
self.restppUrl = self.host + ":" + restppPort + "/restpp"
192+
elif (self.tgCloud and (restppPort == "9000" or restppPort == "443")):
193+
if restppPort == gsPort:
194+
sslPort = gsPort
189195
self.restppPort = sslPort
190196
self.restppUrl = self.host + ":" + sslPort + "/restpp"
191197
else:
192198
self.restppPort = restppPort
193199
self.restppUrl = self.host + ":" + self.restppPort
194-
gsPort = str(gsPort)
200+
195201
self.gsPort = gsPort
196202
if self.tgCloud and (gsPort == "14240" or gsPort == "443"):
197203
self.gsPort = sslPort

pyTigerGraph/pytgasync/pyTigerGraphGSQL.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ async def gsql(self, query: str, graphname: str = None, options=None) -> Union[s
5555
authMode="pwd", resKey=None, skipCheck=True,
5656
jsonResponse=False,
5757
headers={"Content-Type": "text/plain"})
58-
59-
except httpx.HTTPError as e:
58+
except httpx.HTTPStatusError as e:
6059
if e.response.status_code == 404:
6160
res = await self._req("POST",
6261
self.gsUrl + "/gsqlserver/gsql/file",

0 commit comments

Comments
 (0)