mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 17:34:54 +01:00
nmbug-status: only import notmuch when needed
Make it possible to use the script to query search views without notmuch python bindings installed.
This commit is contained in:
parent
73fcfa861c
commit
02cb7cf152
1 changed files with 3 additions and 1 deletions
|
@ -7,7 +7,6 @@
|
|||
# - argparse; either python 2.7, or install separately
|
||||
|
||||
import datetime
|
||||
import notmuch
|
||||
import rfc822
|
||||
import urllib
|
||||
import json
|
||||
|
@ -57,6 +56,9 @@ elif args.get_query != None:
|
|||
if args.get_query == view['title']:
|
||||
print ' and '.join(view['query'])
|
||||
sys.exit(0)
|
||||
else:
|
||||
# only import notmuch if needed
|
||||
import notmuch
|
||||
|
||||
if args.text:
|
||||
output_format = 'text'
|
||||
|
|
Loading…
Reference in a new issue