Exits on using LocalDB

This commit is contained in:
buddhhu
2023-05-14 12:40:09 +05:30
parent cb7889e5b6
commit 24e7379c59

View File

@@ -335,19 +335,17 @@ def UltroidDB():
socket_timeout=5,
retry_on_timeout=True,
)
if MongoClient:
elif MongoClient:
return MongoDB(Var.MONGO_URI)
if psycopg2:
elif psycopg2:
return SqlDB(Var.DATABASE_URL)
except BaseException as err:
LOGS.exception(err)
_er = True
if not _er:
else:
LOGS.critical(
"No DB requirement fullfilled!\nPlease install redis, mongo or sql dependencies...\nTill then using local file as database."
)
if HOSTED_ON == "local":
return LocalDB()
except BaseException as err:
LOGS.exception(err)
exit()