Skip to content

Commit

Permalink
MongoDB fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Rarmash committed Dec 2, 2023
1 parent 4fafab0 commit b2a42f2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions options.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
# If an exception occurs (e.g., connection failure), try to create a MongoDB client with the provided MongoDB link
myclient = pymongo.MongoClient(mongodb_link)

0 comments on commit b2a42f2

Please sign in to comment.