summaryrefslogtreecommitdiff
path: root/alot/db/manager.py
diff options
context:
space:
mode:
authorLucas Hoffmann <l-m-h@web.de>2017-08-18 20:21:25 +0200
committerLucas Hoffmann <l-m-h@web.de>2017-08-20 02:33:00 +0200
commit841c7cc1b70ce90297c332a05afb0e1a45b225cf (patch)
tree49f5088baede3633fc108981d5b40df3798ae80d /alot/db/manager.py
parentd8f1fc89cb1b357de970e2889494199749cffc1f (diff)
py3k: Use build in next function
Diffstat (limited to 'alot/db/manager.py')
-rw-r--r--alot/db/manager.py2
1 files changed, 1 insertions, 1 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)