summaryrefslogtreecommitdiff
path: root/__init__.py
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-02-17 08:37:48 -0300
committerdrebs <drebs@leap.se>2013-02-17 08:37:48 -0300
commit77a29a4cda84ee7d7d4859d5ed183810a3e81693 (patch)
treeb70f5309a8d9950dc2c437d2560f2b46d15a6046 /__init__.py
parent023bfa360d85387d2c76a9de9059bcb1b294006c (diff)
Simple refactor and fix.
Diffstat (limited to '__init__.py')
-rw-r--r--__init__.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/__init__.py b/__init__.py
index 6329cf30..92c9feb5 100644
--- a/__init__.py
+++ b/__init__.py
@@ -14,6 +14,7 @@ import random
import hmac
from leap.soledad.backends import sqlcipher
from leap.soledad.util import GPGWrapper
+from leap.soledad.backends.leap_backend import LeapDocument
class Soledad(object):
@@ -68,8 +69,12 @@ class Soledad(object):
# instantiate u1db
# TODO: verify if secret for sqlcipher should be the same as the
# one for symmetric encryption.
- self._db = sqlcipher.open(self.LOCAL_DB_PATH, True, self._secret,
- soledad=self)
+ self._db = sqlcipher.open(
+ self.LOCAL_DB_PATH,
+ self._secret,
+ create=True,
+ document_factory=LeapDocument,
+ soledad=self)
def close(self):
"""