From: Jani Nikula Date: Sat, 3 Oct 2015 07:57:56 +0000 (+0300) Subject: [PATCH] nmbug-status: print config errors to stderr X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9111da137dc062952ac369b20a2c4ca6ac1486bf;p=notmuch-archives.git [PATCH] nmbug-status: print config errors to stderr --- diff --git a/1c/c3d625167e13e96481f05d46102f3aa739fbaa b/1c/c3d625167e13e96481f05d46102f3aa739fbaa new file mode 100644 index 000000000..4088fd760 --- /dev/null +++ b/1c/c3d625167e13e96481f05d46102f3aa739fbaa @@ -0,0 +1,84 @@ +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 281BD6DE02D2 + for ; Sat, 3 Oct 2015 00:58:23 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.531 +X-Spam-Level: +X-Spam-Status: No, score=-0.531 tagged_above=-999 required=5 tests=[AWL=0.189, + RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] + 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 utS8mFdCihS3 for ; + Sat, 3 Oct 2015 00:58:21 -0700 (PDT) +Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com + [209.85.212.179]) + by arlo.cworth.org (Postfix) with ESMTPS id C22186DE01F5 + for ; Sat, 3 Oct 2015 00:58:20 -0700 (PDT) +Received: by wicge5 with SMTP id ge5so59830256wic.0 + for ; Sat, 03 Oct 2015 00:58:19 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:cc:subject:date:message-id; + bh=c+k+xAZbh9amsRKvoAWu3iWgIEXtnbE+gSIumg+a8dg=; + b=Cfh/H0SOFtul32OWI4zt/PKmAqm5EkUlvtGZed0H64IjKBJqqK+98rav7sEDVZtX5X + C1nktlrQ2tBgwWOOu644yr8i+drSG5if5lgHzJ3P0fyZ5xgfDrWlifLzjyRE2uCGpGm9 + epVjT2b5wDkMs4FhO3jKfTOSaBjhWYivxbCEDmieFe3s7P5BR2goqH92pa2kMbibSdbS + hq7s9CXbLE7IbiFjnqrlEX8Kx6iw012wQglzlixspQIdDv3K69JRhzTHx43+HFKkMDJv + hkxgx8eT+H6EsBFYz6lAx5K6ftP3D4BFIg6lFQygFO2V9Iqof8AaxbRruu1i/Jx6pnwf + WT2g== +X-Gm-Message-State: + ALoCoQkBuECMuUjb1CTKphy9Q1S3bpljL4yHCOEXUSViV2QkIar9dq0MHY0dQ5ms5XzkVOvwpQ3l +X-Received: by 10.194.71.39 with SMTP id r7mr22812955wju.120.1443859098853; + Sat, 03 Oct 2015 00:58:18 -0700 (PDT) +Received: from localhost (mobile-access-bcee9f-54.dhcp.inet.fi. + [188.238.159.54]) + by smtp.gmail.com with ESMTPSA id hx4sm15170604wjb.31.2015.10.03.00.58.17 + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Sat, 03 Oct 2015 00:58:18 -0700 (PDT) +From: Jani Nikula +To: notmuch@notmuchmail.org +Subject: [PATCH] nmbug-status: print config errors to stderr +Date: Sat, 3 Oct 2015 10:57:56 +0300 +Message-Id: <1443859076-8895-1-git-send-email-jani@nikula.org> +X-Mailer: git-send-email 2.1.4 +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 07:58:23 -0000 + +Particularly scripted usage with stdout redirection can be confusing +if errors are printed to stdout instead of stderr. +--- + 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 +