Added start blocke on no database connection available

This commit is contained in:
2024-12-14 20:28:04 +01:00
parent 559ad1b882
commit 903a2b8dc1
13 changed files with 161 additions and 41 deletions

View File

@@ -2,11 +2,17 @@ from .DbManager import DbManager
class BTypeDAO:
__cur = None
def __init__(self):
#print(f"*** File: {__file__}, init()")
self.__con = DbManager().getConnection()
self.__cur = self.__con.cursor()
if self.__con:
self.__cur = self.__con.cursor()
def getBType(self):
self.__cur.callproc("getBtype", (None, None, ))
data = self.__cur.fetchall()
return(data)
if self.__cur:
self.__cur.callproc("getBtype", (None, None, ))
data = self.__cur.fetchall()
return(data)
else:
return None