[PATCH 3/3] nmbug-status: only import notmuch when needed
authorJani Nikula <jani@nikula.org>
Mon, 1 Apr 2013 09:44:02 +0000 (12:44 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:54:10 +0000 (09:54 -0800)
25/4347f384288243507a9e1e6d73801a1a6fd3c4 [new file with mode: 0644]

diff --git a/25/4347f384288243507a9e1e6d73801a1a6fd3c4 b/25/4347f384288243507a9e1e6d73801a1a6fd3c4
new file mode 100644 (file)
index 0000000..95c2d66
--- /dev/null
@@ -0,0 +1,101 @@
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id BF271429E53\r
+       for <notmuch@notmuchmail.org>; Mon,  1 Apr 2013 02:44:17 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id XC8-0XAloC4O for <notmuch@notmuchmail.org>;\r
+       Mon,  1 Apr 2013 02:44:17 -0700 (PDT)\r
+Received: from mail-la0-f46.google.com (mail-la0-f46.google.com\r
+       [209.85.215.46]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 75397429E26\r
+       for <notmuch@notmuchmail.org>; Mon,  1 Apr 2013 02:44:15 -0700 (PDT)\r
+Received: by mail-la0-f46.google.com with SMTP id fq12so1977152lab.33\r
+       for <notmuch@notmuchmail.org>; Mon, 01 Apr 2013 02:44:14 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=google.com; s=20120113;\r
+       h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to\r
+       :references:in-reply-to:references:x-gm-message-state;\r
+       bh=d9aDKSTn5ib9fqhEuImXbIU6XvOwVCgHEAcN57tVbzU=;\r
+       b=ChekM7f7u6T9bFMwrkLqrXYQuaDokAyuamipLeAuA4sTCfmaOUn1HyevW2PEh/nQgV\r
+       6s12bcPURBwLKdX5Gs+pVa5SB0Os9sArGVJuqV9r6BmclO9WbF/NdCUa5lhn8laFOr3b\r
+       eC/Gqw/+el694pNBQ4Aib8fUj3IzWN2m9y1u7HXj/NQ2S6e6TiWl3CEqAXFsmaA1BWCl\r
+       bTher/L4y/cDQtRNAhzei8WHv4GwdyojDdV60ZX8sKQU5DJI+fpBHg7bC8r6z8S0AJNc\r
+       pQkjYZbgBNyu7gCy1n3sEpozQBkLHVBWTMU6Qn1zphW+r19Rku4cXY7fcldxLnhSo3/E\r
+       mm4Q==\r
+X-Received: by 10.112.145.8 with SMTP id sq8mr5492071lbb.55.1364809453977;\r
+       Mon, 01 Apr 2013 02:44:13 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw4-50df51-27.dhcp.inet.fi.\r
+       [80.223.81.27])\r
+       by mx.google.com with ESMTPS id oy10sm5300586lab.8.2013.04.01.02.44.12\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Mon, 01 Apr 2013 02:44:13 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 3/3] nmbug-status: only import notmuch when needed\r
+Date: Mon,  1 Apr 2013 12:44:02 +0300\r
+Message-Id:\r
+ <dce49c9bb3a4362b3ec26756ba29afe0c1eb27ed.1364809172.git.jani@nikula.org>\r
+X-Mailer: git-send-email 1.7.10.4\r
+In-Reply-To: <cover.1364809172.git.jani@nikula.org>\r
+References: <cover.1364809172.git.jani@nikula.org>\r
+In-Reply-To: <cover.1364809172.git.jani@nikula.org>\r
+References: <cover.1364809172.git.jani@nikula.org>\r
+X-Gm-Message-State:\r
+ ALoCoQnylkuWuMMQYRDncPvllhsik63ioff9hqPxQCpKrXrkZN4Iqhhc/nqmEQiBvtpR9ND7ofOQ\r
+Cc: Tomi Ollila <tomi.ollila@iki.fi>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 01 Apr 2013 09:44:18 -0000\r
+\r
+Make it possible to use the script to query search views without\r
+notmuch python bindings installed.\r
+---\r
+ devel/nmbug/nmbug-status |    4 +++-\r
+ 1 file changed, 3 insertions(+), 1 deletion(-)\r
+\r
+diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status\r
+index d83ca2d..775f8ec 100755\r
+--- a/devel/nmbug/nmbug-status\r
++++ b/devel/nmbug/nmbug-status\r
+@@ -7,7 +7,6 @@\r
+ #       - argparse; either python 2.7, or install separately\r
\r
+ import datetime\r
+-import notmuch\r
+ import rfc822\r
+ import urllib\r
+ import json\r
+@@ -49,6 +48,9 @@ elif args.get_query != None:\r
+         if args.get_query == view['title']:\r
+             print ' and '.join(view['query'])\r
+     sys.exit(0)\r
++else:\r
++    # only import notmuch if needed\r
++    import notmuch\r
\r
+ if args.text:\r
+     output_format = 'text'\r
+-- \r
+1.7.10.4\r
+\r