summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/leap/soledad/__init__.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/leap/soledad/__init__.py b/src/leap/soledad/__init__.py
index 94ebec1a..be8a7054 100644
--- a/src/leap/soledad/__init__.py
+++ b/src/leap/soledad/__init__.py
@@ -192,7 +192,7 @@ class Soledad(object):
raise NoServerUrl()
#
- # initialization methods
+ # initialization/destruction methods
#
def _bootstrap(self):
@@ -298,6 +298,12 @@ class Soledad(object):
"""
self._db.close()
+ def __del__(self):
+ """
+ Make sure local database is closed when object is destroyed.
+ """
+ self.close()
+
#
# Management of secret for symmetric encryption.
#