From 689d29abffc2ec37766e457d4ad5c714b23225ab Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Fri, 2 Jun 2023 10:58:09 +0200 Subject: [PATCH] use 'tlsCAFile' instead of deprecated 'ssl_ca_certs' (#5080) --- igniter/tools.py | 4 ++-- openpype/client/mongo/mongo.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/igniter/tools.py b/igniter/tools.py index df583fbb51..9dea203f0c 100644 --- a/igniter/tools.py +++ b/igniter/tools.py @@ -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 diff --git a/openpype/client/mongo/mongo.py b/openpype/client/mongo/mongo.py index ce8d35fcdd..2be426efeb 100644 --- a/openpype/client/mongo/mongo.py +++ b/openpype/client/mongo/mongo.py @@ -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)