Loading src/common/mixins/sqlite.py +3 −3 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ class SQLiteMixin: self.connection = sqlite3.connect(SQLiteMixin.DEFAULT_DB) self.connection.row_factory = ( sqlite3.Row ) # Optional: This enables column access by name ) # This enables column access by name self.cursor = self.connection.cursor() self.logger.debug("Successfully opened connection to database and created cursor") except sqlite3.OperationalError as error: Loading @@ -50,8 +50,6 @@ class SQLiteMixin: return None except sqlite3.InterfaceError as error: self.logger.error(f"An unexpected InterfaceError occurred: {error}") except sqlite3.DatabaseError as error: self.logger.error(f"An unexpected DatabaseError occurred: {error}") except sqlite3.DataError as error: self.logger.error(f"An unexpected DataError occurred: {error}") except sqlite3.IntegrityError as error: Loading @@ -60,6 +58,8 @@ class SQLiteMixin: self.logger.error(f"An unexpected ProgrammingError occurred: {error}") except sqlite3.NotSupportedError as error: self.logger.error(f"An unexpected NotSupportedError occurred: {error}") except sqlite3.DatabaseError as error: self.logger.error(f"An unexpected DatabaseError occurred: {error}") except Exception as error: self.logger.error( "There was an undetermined issue with the query process: " + f" {error}" Loading Loading
src/common/mixins/sqlite.py +3 −3 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ class SQLiteMixin: self.connection = sqlite3.connect(SQLiteMixin.DEFAULT_DB) self.connection.row_factory = ( sqlite3.Row ) # Optional: This enables column access by name ) # This enables column access by name self.cursor = self.connection.cursor() self.logger.debug("Successfully opened connection to database and created cursor") except sqlite3.OperationalError as error: Loading @@ -50,8 +50,6 @@ class SQLiteMixin: return None except sqlite3.InterfaceError as error: self.logger.error(f"An unexpected InterfaceError occurred: {error}") except sqlite3.DatabaseError as error: self.logger.error(f"An unexpected DatabaseError occurred: {error}") except sqlite3.DataError as error: self.logger.error(f"An unexpected DataError occurred: {error}") except sqlite3.IntegrityError as error: Loading @@ -60,6 +58,8 @@ class SQLiteMixin: self.logger.error(f"An unexpected ProgrammingError occurred: {error}") except sqlite3.NotSupportedError as error: self.logger.error(f"An unexpected NotSupportedError occurred: {error}") except sqlite3.DatabaseError as error: self.logger.error(f"An unexpected DatabaseError occurred: {error}") except Exception as error: self.logger.error( "There was an undetermined issue with the query process: " + f" {error}" Loading