]> git.notmuchmail.org Git - notmuch/commitdiff
python/notmuch2: fix exclude tag handling
authorJohannes Larsen <mail@johslarsen.net>
Fri, 25 Dec 2020 15:21:45 +0000 (11:21 -0400)
committerDavid Bremner <david@tethera.net>
Fri, 25 Dec 2020 15:25:25 +0000 (11:25 -0400)
A typo in Database._create_query lost the exclude_tag names during the
string to utf-8 conversion.

Amended by DB: fixed patch format and updated commit message.

bindings/python-cffi/notmuch2/_database.py

index 5ab0f20a72644dfddb56b5d569292bab3f695258..868f4408cb18f2b00196d6314e1d4f3fe34ade5d 100644 (file)
@@ -578,7 +578,7 @@ class Database(base.NotmuchObject):
         if exclude_tags is not None:
             for tag in exclude_tags:
                 if isinstance(tag, str):
-                    tag = str.encode('utf-8')
+                    tag = tag.encode('utf-8')
                 capi.lib.notmuch_query_add_tag_exclude(query_p, tag)
         return querymod.Query(self, query_p)