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.
This commit is contained in:
Sebastian Spaeth 2010-03-22 11:19:51 +01:00
parent c3239d3eb4
commit 63c5a6d77d

View file

@ -314,7 +314,7 @@ class Database(object):
# Raise a NotmuchError if not initialized # Raise a NotmuchError if not initialized
self._verify_initialized_db() self._verify_initialized_db()
return Query(self._db, querystring) return Query(self, querystring)
def __repr__(self): def __repr__(self):
return "'Notmuch DB " + self.get_path() + "'" return "'Notmuch DB " + self.get_path() + "'"