From 1492b379c3c1c905cd0732775f64fa3c79b3bb41 Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Sat, 3 Oct 2015 12:08:05 +0300 Subject: [PATCH] Re: [PATCH] nmbug-status: print config errors to stderr --- b1/9c03575cafdb622f6b487b6a57157594d2dabe | 81 +++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 b1/9c03575cafdb622f6b487b6a57157594d2dabe diff --git a/b1/9c03575cafdb622f6b487b6a57157594d2dabe b/b1/9c03575cafdb622f6b487b6a57157594d2dabe new file mode 100644 index 000000000..094a62bae --- /dev/null +++ b/b1/9c03575cafdb622f6b487b6a57157594d2dabe @@ -0,0 +1,81 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 8B21D6DE01F5 + for ; Sat, 3 Oct 2015 02:08:07 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.775 +X-Spam-Level: +X-Spam-Status: No, score=0.775 tagged_above=-999 required=5 tests=[AWL=0.123, + SPF_NEUTRAL=0.652] autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id x_srs-M2i-ol for ; + Sat, 3 Oct 2015 02:08:04 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by arlo.cworth.org (Postfix) with ESMTP id 96D416DE0140 + for ; Sat, 3 Oct 2015 02:08:04 -0700 (PDT) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id B091810007F; + Sat, 3 Oct 2015 12:08:05 +0300 (EEST) +From: Tomi Ollila +To: Jani Nikula , notmuch@notmuchmail.org +Subject: Re: [PATCH] nmbug-status: print config errors to stderr +In-Reply-To: <1443859076-8895-1-git-send-email-jani@nikula.org> +References: <1443859076-8895-1-git-send-email-jani@nikula.org> +User-Agent: Notmuch/0.20.2+68~g0c35549 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.18 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 03 Oct 2015 09:08:07 -0000 + +On Sat, Oct 03 2015, Jani Nikula wrote: + +> Particularly scripted usage with stdout redirection can be confusing +> if errors are printed to stdout instead of stderr. + +LGTM + +> --- +> devel/nmbug/nmbug-status | 2 +- +> 1 file changed, 1 insertion(+), 1 deletion(-) +> +> diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status +> index a289798e3cc1..b36b6ad33859 100755 +> --- a/devel/nmbug/nmbug-status +> +++ b/devel/nmbug/nmbug-status +> @@ -318,7 +318,7 @@ args = parser.parse_args() +> try: +> config = read_config(path=args.config) +> except ConfigError as e: +> - print(e) +> + print(e, file=sys.stderr) +> sys.exit(1) +> +> header_template = config['meta'].get('header', ''' +> -- +> 2.1.4 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2