diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2012-01-08 18:14:17 +0000 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2012-01-08 18:14:17 +0000 |
commit | eabcacdcd64b714edcb89bc40af61f903bc4771a (patch) | |
tree | 25a00684e002bd0ed2a1c9d19347451a0206b075 /alot | |
parent | c83fc4f8e9572729ec17b7fc469dcf2ba34e72c7 (diff) |
propagate remove_rest in Message.add_tags
Diffstat (limited to 'alot')
-rw-r--r-- | alot/message.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/alot/message.py b/alot/message.py index db96803b..c87e1bba 100644 --- a/alot/message.py +++ b/alot/message.py @@ -160,7 +160,7 @@ class Message(object): """ return extract_headers(self.get_mail(), headers) - def add_tags(self, tags, afterwards=None): + def add_tags(self, tags, afterwards=None, remove_rest=False): """ adds tags to message @@ -175,13 +175,16 @@ class Message(object): :param afterwards: callback that gets called after successful application of this tagging operation :type afterwards: callable + :param remove_rest: remove all other tags + :type remove_rest: bool """ def myafterwards(): self._tags = self._tags.union(tags) if callable(afterwards): afterwards() - self._dbman.tag('id:' + self._id, tags, myafterwards) + self._dbman.tag('id:' + self._id, tags, afterwards=myafterwards, + remove_rest=remove_rest) self._tags = self._tags.union(tags) def remove_tags(self, tags, afterwards=None): |