From b2a42f23f7237b97acb630c19a179fc00a853cff Mon Sep 17 00:00:00 2001 From: Andrew <62994051+Rarmash@users.noreply.github.com> Date: Sat, 2 Dec 2023 20:10:33 +0300 Subject: [PATCH] MongoDB fix --- options.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/options.py b/options.py index 26476d4..b7c5c63 100644 --- a/options.py +++ b/options.py @@ -32,8 +32,8 @@ check_servers_file() try: - # Try to create a MongoDB client with the provided MongoDB link - myclient = pymongo.MongoClient(mongodb_link) + # Try to create a MongoDB client with TLS/SSL using certifi + myclient = pymongo.MongoClient(mongodb_link, tlsCAFile=certifi.where()) except: - # If an exception occurs (e.g., connection failure), try to create a MongoDB client with TLS/SSL using certifi - myclient = pymongo.MongoClient(mongodb_link, tlsCAFile=certifi.where()) \ No newline at end of file + # If an exception occurs (e.g., connection failure), try to create a MongoDB client with the provided MongoDB link + myclient = pymongo.MongoClient(mongodb_link)