diff options
author | Anton Khirnov <anton@khirnov.net> | 2020-05-08 17:13:02 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2020-05-09 15:27:23 +0200 |
commit | 4c02a40d5dcec1fba988aa626da2dd0d9a058abd (patch) | |
tree | 67e43adad81d079560c016ce99b2708bcd6749aa /alot/buffers | |
parent | 9a8621234211fd13f59374304fe57f6cf7bfd98e (diff) |
Switch to the notmuch2 bindings.
They are supposed to replace the original notmuch python bindings,
providing a safer and more pythonic interface.
Diffstat (limited to 'alot/buffers')
-rw-r--r-- | alot/buffers/search.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/alot/buffers/search.py b/alot/buffers/search.py index 74b47439..8c4c4f7c 100644 --- a/alot/buffers/search.py +++ b/alot/buffers/search.py @@ -2,8 +2,7 @@ # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file import urwid -import logging -from notmuch import NotmuchError +from notmuch2 import NotmuchError from .buffer import Buffer from ..settings.const import settings @@ -144,7 +143,9 @@ class SearchBuffer(Buffer): exclude_tags = settings.get_notmuch_setting('search', 'exclude_tags') if exclude_tags: - exclude_tags = [t for t in exclude_tags.split(';') if t] + exclude_tags = frozenset([t for t in exclude_tags.split(';') if t]) + else: + exclude_tags = frozenset() self._result_count_val = None self._thread_count_val = None |