def close(self):
if self.__delayed_connection_path and self.__connection is None:<EOL><INDENT>self.__initialize_connection()<EOL>return<EOL><DEDENT>try:<EOL><INDENT>self.check_connection()<EOL><DEDENT>except (SystemError, NullDatabaseConnectionError):<EOL><INDENT>return<EOL><DEDENT>logger.debug("<STR_LIT>".format(self.database_path))<EOL>self.commit()<EOL>self.connection.close()<EOL>self.__initialize_connection()<EOL>
Commit and close the connection.

.. seealso:: :py:meth:`sqlite3.Connection.close`