use 'tlsCAFile' instead of deprecated 'ssl_ca_certs' (#5080)

This commit is contained in:
Jakub Trllo 2023-06-02 10:58:09 +02:00 committed by Jakub Trllo
parent 3869a6f1d0
commit 689d29abff
2 changed files with 3 additions and 3 deletions

View file

@ -73,7 +73,7 @@ def validate_mongo_connection(cnx: str) -> (bool, str):
}
# Add certificate path if should be required
if should_add_certificate_path_to_mongo_url(cnx):
kwargs["ssl_ca_certs"] = certifi.where()
kwargs["tlsCAFile"] = certifi.where()
try:
client = MongoClient(cnx, **kwargs)
@ -147,7 +147,7 @@ def get_openpype_global_settings(url: str) -> dict:
"""
kwargs = {}
if should_add_certificate_path_to_mongo_url(url):
kwargs["ssl_ca_certs"] = certifi.where()
kwargs["tlsCAFile"] = certifi.where()
try:
# Create mongo connection

View file

@ -224,7 +224,7 @@ class OpenPypeMongoConnection:
"serverSelectionTimeoutMS": timeout
}
if should_add_certificate_path_to_mongo_url(mongo_url):
kwargs["ssl_ca_certs"] = certifi.where()
kwargs["tlsCAFile"] = certifi.where()
mongo_client = pymongo.MongoClient(mongo_url, **kwargs)