summaryrefslogtreecommitdiff
path: root/src/leap/soledad
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/soledad')
-rw-r--r--src/leap/soledad/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/leap/soledad/__init__.py b/src/leap/soledad/__init__.py
index 7ffb6837..791f8331 100644
--- a/src/leap/soledad/__init__.py
+++ b/src/leap/soledad/__init__.py
@@ -290,7 +290,10 @@ class Soledad(object):
"""
Close underlying U1DB database.
"""
- self._db.close()
+ if hasattr(self, '_db') and isinstance(
+ self._db,
+ sqlcipher.SQLCipherDatabase):
+ self._db.close()
def __del__(self):
"""