Skip to content

Commit

Permalink
Merge pull request #272 from tigergraph/v1.8
Browse files Browse the repository at this point in the history
V1.8
  • Loading branch information
parkererickson-tg authored Jan 20, 2025
2 parents ee308c6 + 30fee31 commit d42a804
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pyTigerGraph/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
from pyTigerGraph.pytgasync.pyTigerGraph import AsyncTigerGraphConnection
from pyTigerGraph.common.exception import TigerGraphException

__version__ = "1.8.3"
__version__ = "1.8.4"

__license__ = "Apache 2"
8 changes: 6 additions & 2 deletions pyTigerGraph/common/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,18 @@ def __init__(self, host: str = "http://127.0.0.1", graphname: str = "MyGraph",

restppPort = str(restppPort)
sslPort = str(sslPort)
if self.tgCloud and (restppPort == "9000" or restppPort == "443"):
gsPort = str(gsPort)
if restppPort == gsPort:
self.restppPort = restppPort
self.restppUrl = self.host + ":" + restppPort + "/restpp"
elif self.tgCloud and (restppPort == "9000" or restppPort == "443"):
self.restppPort = sslPort
self.restppUrl = self.host + ":" + sslPort + "/restpp"
else:
self.restppPort = restppPort
self.restppUrl = self.host + ":" + self.restppPort

self.gsPort = ""
gsPort = str(gsPort)
if self.tgCloud and (gsPort == "14240" or gsPort == "443"):
self.gsPort = sslPort
self.gsUrl = self.host + ":" + sslPort
Expand Down
10 changes: 8 additions & 2 deletions pyTigerGraph/pyTigerGraphBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,20 @@ def __init__(self, host: str = "http://127.0.0.1", graphname: str = "MyGraph",
raise (TigerGraphException("Incorrect graphname."))

restppPort = str(restppPort)
gsPort = str(gsPort)
sslPort = str(sslPort)
if self.tgCloud and (restppPort == "9000" or restppPort == "443"):
if restppPort == gsPort:
self.restppPort = restppPort
self.restppUrl = self.host + ":" + restppPort + "/restpp"
elif (self.tgCloud and (restppPort == "9000" or restppPort == "443")):
if restppPort == gsPort:
sslPort = gsPort
self.restppPort = sslPort
self.restppUrl = self.host + ":" + sslPort + "/restpp"
else:
self.restppPort = restppPort
self.restppUrl = self.host + ":" + self.restppPort
gsPort = str(gsPort)

self.gsPort = gsPort
if self.tgCloud and (gsPort == "14240" or gsPort == "443"):
self.gsPort = sslPort
Expand Down
3 changes: 1 addition & 2 deletions pyTigerGraph/pytgasync/pyTigerGraphGSQL.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ async def gsql(self, query: str, graphname: str = None, options=None) -> Union[s
authMode="pwd", resKey=None, skipCheck=True,
jsonResponse=False,
headers={"Content-Type": "text/plain"})

except httpx.HTTPError as e:
except httpx.HTTPStatusError as e:
if e.response.status_code == 404:
res = await self._req("POST",
self.gsUrl + "/gsqlserver/gsql/file",
Expand Down

0 comments on commit d42a804

Please sign in to comment.