Re: [PATCH] nmbug-status: print config errors to stderr
authorTomi Ollila <tomi.ollila@iki.fi>
Sat, 3 Oct 2015 09:08:05 +0000 (12:08 +0300)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:49:42 +0000 (14:49 -0700)
b1/9c03575cafdb622f6b487b6a57157594d2dabe [new file with mode: 0644]

diff --git a/b1/9c03575cafdb622f6b487b6a57157594d2dabe b/b1/9c03575cafdb622f6b487b6a57157594d2dabe
new file mode 100644 (file)
index 0000000..094a62b
--- /dev/null
@@ -0,0 +1,81 @@
+Return-Path: <tomi.ollila@iki.fi>\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 8B21D6DE01F5\r
+ for <notmuch@notmuchmail.org>; Sat,  3 Oct 2015 02:08:07 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.775\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.775 tagged_above=-999 required=5 tests=[AWL=0.123, \r
+ SPF_NEUTRAL=0.652] 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 x_srs-M2i-ol for <notmuch@notmuchmail.org>;\r
+ Sat,  3 Oct 2015 02:08:04 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 96D416DE0140\r
+ for <notmuch@notmuchmail.org>; Sat,  3 Oct 2015 02:08:04 -0700 (PDT)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+ by guru.guru-group.fi (Postfix) with ESMTP id B091810007F;\r
+ Sat,  3 Oct 2015 12:08:05 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] nmbug-status: print config errors to stderr\r
+In-Reply-To: <1443859076-8895-1-git-send-email-jani@nikula.org>\r
+References: <1443859076-8895-1-git-send-email-jani@nikula.org>\r
+User-Agent: Notmuch/0.20.2+68~g0c35549 (http://notmuchmail.org) Emacs/24.3.1\r
+ (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+ $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+ !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Sat, 03 Oct 2015 12:08:05 +0300\r
+Message-ID: <m2eghcqpze.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\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 09:08:07 -0000\r
+\r
+On Sat, Oct 03 2015, Jani Nikula <jani@nikula.org> wrote:\r
+\r
+> Particularly scripted usage with stdout redirection can be confusing\r
+> if errors are printed to stdout instead of stderr.\r
+\r
+LGTM\r
+\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
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r