From 7974b975ba5b903018da68c90c3862c22d10f4d6 Mon Sep 17 00:00:00 2001 From: drebs Date: Mon, 24 Dec 2012 12:24:41 -0200 Subject: Enforce need of password for SQLCipherDatabase --- backends/sqlcipher.py | 6 +++--- 1 file 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 -- cgit v1.2.3