]> git.notmuchmail.org Git - notmuch/commitdiff
Fix Database().create_query() to actually initialize the Query with the correct object.
authorSebastian Spaeth <sebastian@sspaeth.de>
Mon, 22 Mar 2010 10:19:51 +0000 (11:19 +0100)
committerSebastian Spaeth <sebastian@sspaeth.de>
Mon, 22 Mar 2010 10:19:51 +0000 (11:19 +0100)
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.

cnotmuch/database.py

index b759391af9909c219dc1ec1029081ce40b923536..dde7da16eecea67fec9e513d27c16588a1abccf8 100644 (file)
@@ -314,7 +314,7 @@ class Database(object):
         # Raise a NotmuchError if not initialized
         self._verify_initialized_db()
 
         # 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() + "'"
 
     def __repr__(self):
         return "'Notmuch DB " + self.get_path() + "'"