From: Stefan Schantl Date: Wed, 15 Jan 2020 16:41:43 +0000 (+0100) Subject: database: Remove some unused code to close the database X-Git-Tag: 013~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9bcdce1c8005f140cdaacaa7bf74dc3756fc442d;p=ddns.git database: Remove some unused code to close the database The interfaces have changed in Python 3 and we do not explicitely need to close the database connection. Signed-off-by: Stefan Schantl --- diff --git a/src/ddns/database.py b/src/ddns/database.py index e0a035a..2de050b 100644 --- a/src/ddns/database.py +++ b/src/ddns/database.py @@ -37,9 +37,6 @@ class DDNSDatabase(object): # 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) @@ -80,12 +77,6 @@ class DDNSDatabase(object): # 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)