summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
Diffstat (limited to 'alot')
-rw-r--r--alot/commands/globals.py2
-rw-r--r--alot/completion.py4
-rw-r--r--alot/db/manager.py2
-rw-r--r--alot/db/thread.py2
4 files changed, 5 insertions, 5 deletions
diff --git a/alot/commands/globals.py b/alot/commands/globals.py
index b71376a2..f8f58749 100644
--- a/alot/commands/globals.py
+++ b/alot/commands/globals.py
@@ -863,7 +863,7 @@ class ComposeCommand(Command):
self.envelope.sign_key = account.gpg_key
else:
msg = 'Cannot find gpg key for account {}'.format(account.address)
- logging.warn(msg)
+ logging.warning(msg)
ui.notify(msg, priority='error')
# get missing To header
diff --git a/alot/completion.py b/alot/completion.py
index 88eee312..3d214ca5 100644
--- a/alot/completion.py
+++ b/alot/completion.py
@@ -437,10 +437,10 @@ class CommandCompleter(Completer):
localpos)
# prepend 'set ' + header and correct position
- def f((completed, pos)):
+ def f(completed, pos):
return ('%s %s' % (header, completed),
pos + len(header) + 1)
- res = [f(r) for r in res]
+ res = [f(c, p) for c, p in res]
logging.debug(res)
elif self.mode == 'envelope' and cmd == 'unset':
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)