Skip to content

Commit 1195598

Browse files
🩹 fix(notmuch-abook): Adapt to notmuch2 Python lib.
1 parent 0f63706 commit 1195598

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.bin/notmuch-abook

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ import os
7373
import re
7474
import sys
7575
import docopt
76-
import notmuch
76+
import notmuch2 as notmuch
7777
import sqlite3
7878
import email.utils
7979
import email.parser
@@ -194,8 +194,7 @@ class NotmuchAddressGetter(object):
194194

195195
def _get_all_messages(self):
196196
notmuch_db = notmuch.Database(self.db_path)
197-
query = notmuch.Query(notmuch_db, self.query)
198-
return query.search_messages()
197+
return notmuch_db.messages(self.query)
199198

200199
def generate(self):
201200
msgs = self._get_all_messages()

0 commit comments

Comments
 (0)