Skip to content

Commit

Permalink
Utils modified
Browse files Browse the repository at this point in the history
  • Loading branch information
anish-dhage committed Oct 31, 2024
1 parent 1792429 commit 716907c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions utils.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import os
import sys
from pymongo import MongoClient

import ssl

def get_DB(isTest=False):
with open(os.path.join(sys.path[0], "config.ini"), "r") as f:
content = f.readlines()
client = MongoClient("mongodb+srv://anishd1910:" +
content[0]+"@cluster0.oagwk.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0&ssl=true")
content[0]+"@cluster0.oagwk.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0",
ssl=True,
ssl_cert_reqs=ssl.CERT_NONE)

if (isTest):
return client.SETestProj
Expand Down

0 comments on commit 716907c

Please sign in to comment.