From: Sebastian Spaeth Date: Mon, 22 Mar 2010 10:20:00 +0000 (+0100) Subject: notmuch: use new function Database().create_query() for 'count' X-Git-Tag: 0.3~121^2~50 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=2b32acacbd02ad27e96a2eb234ff3d92de5e87d4 notmuch: use new function Database().create_query() for 'count' --- 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':