Skip to content

Commit

Permalink
GML-1660 fix the version configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Lu Zhou authored and Lu Zhou committed May 24, 2024
1 parent 030656c commit 80f0503
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions pyTigerGraph/pyTigerGraphBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@ def __init__(self, host: str = "http://127.0.0.1", graphname: str = "MyGraph",
# self.apiToken = apiToken

# TODO Eliminate version and use gsqlVersion only, meaning TigerGraph server version
# if gsqlVersion:
# self.version = gsqlVersion
# elif version:
# warnings.warn(
# "The `version` parameter is deprecated; use the `gsqlVersion` parameter instead.",
# DeprecationWarning)
# self.version = version
# else:
# self.version = ""
if gsqlVersion:
self.version = gsqlVersion
elif version:
warnings.warn(
"The `version` parameter is deprecated; use the `gsqlVersion` parameter instead.",
DeprecationWarning)
self.version = version
else:
self.version = ""


# if self.apiToken:
Expand Down Expand Up @@ -236,13 +236,13 @@ def _verify_jwt_token_support(self):
self.getVer()
except requests.exceptions.HTTPError as e:
if e.response.status_code == 403:
logger.error(f"Unauthorized error in getVer: {e}. The JWT token might be invalid or expired.")
logger.error(f"Unauthorized error: {e}. The JWT token might be invalid or expired.")
else:
logger.error(f"HTTP error occurred in getVer: {e}")
logger.error(f"HTTP error occurred: {e}")
# logger.error("The DB version using doesn't support JWT token for RestPP. Please switch to API token or username/password.")
raise
except Exception as e:
logger.error(f"Error occurred in getVer: {e}. The DB version using doesn't support JWT token for RestPP.")
logger.error(f"Error occurred: {e}. The DB version using doesn't support JWT token for RestPP.")
logger.error("Please switch to API token or username/password.")
raise

Expand Down

0 comments on commit 80f0503

Please sign in to comment.