summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2012-12-24 12:24:41 -0200
committerdrebs <drebs@leap.se>2012-12-24 12:24:41 -0200
commit7ad507d24ee8c6f38d527c298311159594922658 (patch)
tree7858ad96b9da31c1ad8d29c25a5a55ec63996d2f /src
parent319e279b59ac080779d0a3375ae4d6582f5ee6a3 (diff)
Enforce need of password for SQLCipherDatabase
Diffstat (limited to 'src')
-rw-r--r--src/leap/soledad/backends/sqlcipher.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/leap/soledad/backends/sqlcipher.py b/src/leap/soledad/backends/sqlcipher.py
index 6fd6e619..ae9ca28a 100644
--- a/src/leap/soledad/backends/sqlcipher.py
+++ b/src/leap/soledad/backends/sqlcipher.py
@@ -39,7 +39,7 @@ from u1db import (
)
-def open(path, create, document_factory=None, password=None):
+def open(path, create, password, document_factory=None):
"""Open a database at the given location.
Will raise u1db.errors.DatabaseDoesNotExist if create=False and the
@@ -53,7 +53,7 @@ def open(path, create, document_factory=None, password=None):
:return: An instance of Database.
"""
from u1db.backends import sqlite_backend
- return sqlite_backend.SQLCipherDatabase.open_database(
+ return SQLCipherDatabase.open_database(
path, password, create=create, document_factory=document_factory)
@@ -68,7 +68,7 @@ class SQLCipherDatabase(SQLitePartialExpandDatabase):
db_handle.cursor().execute("PRAGMA key = '%s'" % key)
def __init__(self, sqlite_file, password, document_factory=None):
- """Create a new sqlite file."""
+ """Create a new sqlcipher file."""
self._db_handle = dbapi2.connect(sqlite_file)
SQLCipherDatabase.set_pragma_key(self._db_handle, password)
self._real_replica_uid = None