[PATCH] nmbug-status: print config errors to stderr
authorJani Nikula <jani@nikula.org>
Sat, 3 Oct 2015 07:57:56 +0000 (10:57 +0300)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:49:42 +0000 (14:49 -0700)
1c/c3d625167e13e96481f05d46102f3aa739fbaa [new file with mode: 0644]

diff --git a/1c/c3d625167e13e96481f05d46102f3aa739fbaa b/1c/c3d625167e13e96481f05d46102f3aa739fbaa
new file mode 100644 (file)
index 0000000..4088fd7
--- /dev/null
@@ -0,0 +1,84 @@
+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 arlo.cworth.org (Postfix) with ESMTP id 281BD6DE02D2\r
+ for <notmuch@notmuchmail.org>; Sat,  3 Oct 2015 00:58:23 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.531\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.531 tagged_above=-999 required=5 tests=[AWL=0.189,\r
+  RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01]\r
+ autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id utS8mFdCihS3 for <notmuch@notmuchmail.org>;\r
+ Sat,  3 Oct 2015 00:58:21 -0700 (PDT)\r
+Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com\r
+ [209.85.212.179])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id C22186DE01F5\r
+ for <notmuch@notmuchmail.org>; Sat,  3 Oct 2015 00:58:20 -0700 (PDT)\r
+Received: by wicge5 with SMTP id ge5so59830256wic.0\r
+ for <notmuch@notmuchmail.org>; Sat, 03 Oct 2015 00:58:19 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=1e100.net; s=20130820;\r
+ h=x-gm-message-state:from:to:cc:subject:date:message-id;\r
+ bh=c+k+xAZbh9amsRKvoAWu3iWgIEXtnbE+gSIumg+a8dg=;\r
+ b=Cfh/H0SOFtul32OWI4zt/PKmAqm5EkUlvtGZed0H64IjKBJqqK+98rav7sEDVZtX5X\r
+ C1nktlrQ2tBgwWOOu644yr8i+drSG5if5lgHzJ3P0fyZ5xgfDrWlifLzjyRE2uCGpGm9\r
+ epVjT2b5wDkMs4FhO3jKfTOSaBjhWYivxbCEDmieFe3s7P5BR2goqH92pa2kMbibSdbS\r
+ hq7s9CXbLE7IbiFjnqrlEX8Kx6iw012wQglzlixspQIdDv3K69JRhzTHx43+HFKkMDJv\r
+ hkxgx8eT+H6EsBFYz6lAx5K6ftP3D4BFIg6lFQygFO2V9Iqof8AaxbRruu1i/Jx6pnwf\r
+ WT2g==\r
+X-Gm-Message-State:\r
+ ALoCoQkBuECMuUjb1CTKphy9Q1S3bpljL4yHCOEXUSViV2QkIar9dq0MHY0dQ5ms5XzkVOvwpQ3l\r
+X-Received: by 10.194.71.39 with SMTP id r7mr22812955wju.120.1443859098853;\r
+ Sat, 03 Oct 2015 00:58:18 -0700 (PDT)\r
+Received: from localhost (mobile-access-bcee9f-54.dhcp.inet.fi.\r
+ [188.238.159.54])\r
+ by smtp.gmail.com with ESMTPSA id hx4sm15170604wjb.31.2015.10.03.00.58.17\r
+ (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Sat, 03 Oct 2015 00:58:18 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] nmbug-status: print config errors to stderr\r
+Date: Sat,  3 Oct 2015 10:57:56 +0300\r
+Message-Id: <1443859076-8895-1-git-send-email-jani@nikula.org>\r
+X-Mailer: git-send-email 2.1.4\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.18\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: Sat, 03 Oct 2015 07:58:23 -0000\r
+\r
+Particularly scripted usage with stdout redirection can be confusing\r
+if errors are printed to stdout instead of stderr.\r
+---\r
+ devel/nmbug/nmbug-status | 2 +-\r
+ 1 file changed, 1 insertion(+), 1 deletion(-)\r
+\r
+diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status\r
+index a289798e3cc1..b36b6ad33859 100755\r
+--- a/devel/nmbug/nmbug-status\r
++++ b/devel/nmbug/nmbug-status\r
+@@ -318,7 +318,7 @@ args = parser.parse_args()\r
+ try:\r
+     config = read_config(path=args.config)\r
+ except ConfigError as e:\r
+-    print(e)\r
++    print(e, file=sys.stderr)\r
+     sys.exit(1)\r
\r
+ header_template = config['meta'].get('header', '''<!DOCTYPE html>\r
+-- \r
+2.1.4\r
+\r