diff options
author | drebs <drebs@leap.se> | 2012-12-24 12:24:41 -0200 |
---|---|---|
committer | drebs <drebs@leap.se> | 2012-12-24 12:24:41 -0200 |
commit | 7974b975ba5b903018da68c90c3862c22d10f4d6 (patch) | |
tree | 51c606d87adf0ce7db63aa1818d2977a9cc1e3bf /backends/sqlcipher.py | |
parent | e6fc834f64863a7b3b9a60e540107bbcbd554981 (diff) |
Enforce need of password for SQLCipherDatabase
Diffstat (limited to 'backends/sqlcipher.py')
-rw-r--r-- | backends/sqlcipher.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/backends/sqlcipher.py b/backends/sqlcipher.py index 6fd6e619..ae9ca28a 100644 --- a/backends/sqlcipher.py +++ b/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 |