From 3405475276a2433e1238be330e538ebf2a976e5e Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 7 Aug 2017 14:18:57 +0200 Subject: [PATCH] fix #158 --- afew/NotmuchSettings.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/afew/NotmuchSettings.py b/afew/NotmuchSettings.py index 0b17659..83b78e6 100644 --- a/afew/NotmuchSettings.py +++ b/afew/NotmuchSettings.py @@ -30,12 +30,8 @@ def read_notmuch_settings(path = None): notmuch_settings.readfp(open(path)) def get_notmuch_new_tags(): - tags = notmuch_settings.get_list('new', 'tags') - try: - tags.remove("unread") - except ValueError: - pass - return tags + # see issue 158 + return filter(lambda x: x != 'unread', notmuch_settings.get_list('new', 'tags')) def get_notmuch_new_query(): return '(%s)' % ' AND '.join('tag:%s' % tag for tag in get_notmuch_new_tags())