The interfaces have changed in Python 3 and we do not
explicitely need to close the database connection.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
# so that we do not do it unnecessarily.
self._db = None
- def __del__(self):
- self._close_database()
-
def _open_database(self, path):
logger.debug("Opening database %s" % path)
# In that case the database file will be created in _open_database().
return os.access(os.path.dirname(self.path), os.W_OK)
- def _close_database(self):
- if self._db:
- # TODO: Check Unresolved attribute reference '_db_close' for class 'DDNSDatabase'
- self._db_close()
- self._db = None
-
def _execute(self, query, *parameters):
if self._db is None:
self._db = self._open_database(self.path)