summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-05-07 17:06:21 +0200
committerAnton Khirnov <anton@khirnov.net>2020-05-08 17:16:18 +0200
commit9a8621234211fd13f59374304fe57f6cf7bfd98e (patch)
treec20e340075f1e907ff4dd2a7e2eac55c940835cc
parent63714d4d203570c636ce9253d7a0e10131da16a9 (diff)
db/manager: change add_message signature
Remove the unused afterwards callback, make tags mandatory.
-rw-r--r--alot/db/manager.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/alot/db/manager.py b/alot/db/manager.py
index 806982b5..410a9346 100644
--- a/alot/db/manager.py
+++ b/alot/db/manager.py
@@ -405,7 +405,7 @@ class DBManager:
q.exclude_tag(tag)
return q
- def add_message(self, path, tags=None, afterwards=None):
+ def add_message(self, path, tags):
"""
Adds a file to the notmuch index.
@@ -413,8 +413,6 @@ class DBManager:
:type path: str
:param tags: tagstrings to add
:type tags: list of str
- :param afterwards: callback to trigger after adding
- :type afterwards: callable or None
"""
tags = tags or []
@@ -426,4 +424,4 @@ class DBManager:
msg += 'root path (%s)' % self.path
raise DatabaseError(msg)
else:
- self.writequeue.append(('add', afterwards, path, tags))
+ self.writequeue.append(('add', None, path, tags))