aboutsummaryrefslogtreecommitdiffhomepage
path: root/devel
diff options
context:
space:
mode:
authorGravatar Jani Nikula <jani@nikula.org>2013-04-01 12:44:02 +0300
committerGravatar David Bremner <bremner@debian.org>2013-04-06 08:36:34 -0300
commit02cb7cf1523e82363a229924873464debf3328dc (patch)
tree22010d1d77bcbb9d45f6b96f97635ea1b3dab78e /devel
parent73fcfa861cf412a548238fdf3e0a505d98d7ea78 (diff)
nmbug-status: only import notmuch when needed
Make it possible to use the script to query search views without notmuch python bindings installed.
Diffstat (limited to 'devel')
-rwxr-xr-xdevel/nmbug/nmbug-status4
1 files changed, 3 insertions, 1 deletions
diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
index 55f0d738..934c895f 100755
--- a/devel/nmbug/nmbug-status
+++ b/devel/nmbug/nmbug-status
@@ -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'