Commit 325e87d6 authored by MacFarland's avatar MacFarland
Browse files

some logging and fixing sqlite return from query

parent d660243d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ class PostgresMixin:
        db_timeout = self.connection_info.get("dbTimeout", PostgresMixin.DEFAULT_TIMEOUT)

        self.logger.debug("Opening Database Connection and creating Cursor")
        self.logger.debug(self.connection_info)
        try:
            self.connection = psycopg2.connect(
                database=db_name,
+2 −2
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ class SQLiteMixin:
        :return: True if connection established, else False
        """
        db_name = self.connection_info.get("dbName", SQLiteMixin.DEFAULT_DB)
        self.logger.debug("Opening Database Connection")
        self.logger.debug(f"Opening Database Connection to {db_name}")
        try:
            self.connection = sqlite3.connect(db_name)
            self.connection.row_factory = (
@@ -49,7 +49,7 @@ class SQLiteMixin:
        try:
            self.cursor.execute(query)
            if self.cursor.description is not None:
                return self.cursor.fetchall()
                return [dict(row) for row in self.cursor.fetchall()]
            return None
        except sqlite3.InterfaceError as error:
            self.logger.error(f"An unexpected InterfaceError occurred: {error}")