diff options
-rw-r--r-- | alot/db/manager.py | 2 | ||||
-rw-r--r-- | alot/db/thread.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/alot/db/manager.py b/alot/db/manager.py index ab5785eb..e592da65 100644 --- a/alot/db/manager.py +++ b/alot/db/manager.py @@ -274,7 +274,7 @@ class DBManager(object): """returns :class:`notmuch.database.Thread` with given id""" query = self.query('thread:' + tid) try: - return query.search_threads().next() + return next(query.search_threads()) except StopIteration: errmsg = 'no thread with id %s exists!' % tid raise NonexistantObjectError(errmsg) diff --git a/alot/db/thread.py b/alot/db/thread.py index 69b81870..3d9144db 100644 --- a/alot/db/thread.py +++ b/alot/db/thread.py @@ -231,7 +231,7 @@ class Thread(object): """ if not self._messages: # if not already cached query = self._dbman.query('thread:' + self._id) - thread = query.search_threads().next() + thread = next(query.search_threads()) def accumulate(acc, msg): M = Message(self._dbman, msg, thread=self) |