From 2b32acacbd02ad27e96a2eb234ff3d92de5e87d4 Mon Sep 17 00:00:00 2001 From: Sebastian Spaeth Date: Mon, 22 Mar 2010 11:20:00 +0100 Subject: [PATCH] notmuch: use new function Database().create_query() for 'count' --- notmuch | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/notmuch b/notmuch index e4e07bcf..92f68150 100755 --- a/notmuch +++ b/notmuch @@ -142,15 +142,13 @@ if __name__ == '__main__': print "Not implemented." #------------------------------------- elif sys.argv[1] == 'count': - db = Database() if len(sys.argv) == 2: - #no further search term + #no further search term, count all querystr='' else: #mangle arguments wrapping terms with spaces in quotes querystr = quote_query_line(sys.argv[2:]) - logging.debug("count "+querystr) - print(Query(db,querystr).count_messages()) + print(Database().create_query(querystr).count_messages()) #------------------------------------- elif sys.argv[1] == 'tag': -- 2.26.2