From: Sebastian Spaeth Date: Mon, 22 Mar 2010 10:19:51 +0000 (+0100) Subject: Fix Database().create_query() to actually initialize the Query with the correct object. X-Git-Tag: 0.3~121^2~51 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=63c5a6d77d2b51104305e91676720099f4667e92 Fix Database().create_query() to actually initialize the Query with the correct object. We were passing the internal pointer to the notmuch_database_t object to Query(), but it should be initialized with the Database() object itself. This rightfully raised an exception. Yay, for thorough sanity checking. --- diff --git a/cnotmuch/database.py b/cnotmuch/database.py index b759391a..dde7da16 100644 --- a/cnotmuch/database.py +++ b/cnotmuch/database.py @@ -314,7 +314,7 @@ class Database(object): # Raise a NotmuchError if not initialized self._verify_initialized_db() - return Query(self._db, querystring) + return Query(self, querystring) def __repr__(self): return "'Notmuch DB " + self.get_path() + "'"