[PATCH 1/5] nmbug-status: Avoid hard-coded filename in error message
authorW. Trevor King <wking@tremily.us>
Sat, 2 Jan 2016 06:08:01 +0000 (22:08 +1600)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:50:19 +0000 (14:50 -0700)
a7/1b39484c3d03bb9bcbc23262357e4c4090e743 [new file with mode: 0644]

diff --git a/a7/1b39484c3d03bb9bcbc23262357e4c4090e743 b/a7/1b39484c3d03bb9bcbc23262357e4c4090e743
new file mode 100644 (file)
index 0000000..2837da3
--- /dev/null
@@ -0,0 +1,102 @@
+Return-Path: <wking@tremily.us>\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 B7D5C6DE1A57\r
+ for <notmuch@notmuchmail.org>; Fri,  1 Jan 2016 22:10:23 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.041\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.041 tagged_above=-999 required=5 tests=[AWL=0.042, \r
+ DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001,\r
+ SPF_PASS=-0.001] 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 8ytbZ-UPgtDy for <notmuch@notmuchmail.org>;\r
+ Fri,  1 Jan 2016 22:10:22 -0800 (PST)\r
+Received: from resqmta-po-03v.sys.comcast.net (resqmta-po-03v.sys.comcast.net\r
+ [96.114.154.162])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 3DBCD6DE1AE7\r
+ for <notmuch@notmuchmail.org>; Fri,  1 Jan 2016 22:10:00 -0800 (PST)\r
+Received: from resomta-po-09v.sys.comcast.net ([96.114.154.233])\r
+ by resqmta-po-03v.sys.comcast.net with comcast\r
+ id 0uA01s00152QWKC01uA063; Sat, 02 Jan 2016 06:10:00 +0000\r
+Received: from mail.tremily.us ([73.221.72.168])\r
+ by resomta-po-09v.sys.comcast.net with comcast\r
+ id 0u7z1s0063dr3C901u7zQU; Sat, 02 Jan 2016 06:08:00 +0000\r
+Received: from ullr.tremily.us (unknown [192.168.10.7])\r
+ by mail.tremily.us (Postfix) with ESMTPS id 22DBC1B2F57D;\r
+ Fri,  1 Jan 2016 22:07:59 -0800 (PST)\r
+Received: (nullmailer pid 15179 invoked by uid 1000);\r
+ Sat, 02 Jan 2016 06:08:07 -0000\r
+From: "W. Trevor King" <wking@tremily.us>\r
+To: notmuch@notmuchmail.org\r
+Cc: David Bremner <david@tethera.net>,\r
+ Tomi Ollila <tomi.ollila@iki.fi>, Jani Nikula <jani@nikula.org>,\r
+ Carl Worth <cworth@cworth.org>, "W. Trevor King" <wking@tremily.us>\r
+Subject: [PATCH 1/5] nmbug-status: Avoid hard-coded filename in error message\r
+Date: Fri,  1 Jan 2016 22:08:01 -0800\r
+Message-Id:\r
+ <ed234b4fca39d9a471ee50f845233f025dc1163e.1451714099.git.wking@tremily.us>\r
+X-Mailer: git-send-email 2.1.0.60.g85f0837\r
+In-Reply-To: <cover.1451714099.git.wking@tremily.us>\r
+References: <cover.1451714099.git.wking@tremily.us>\r
+In-Reply-To: <cover.1451714099.git.wking@tremily.us>\r
+References: <cover.1451714099.git.wking@tremily.us>\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;\r
+ s=q20140121; t=1451715000;\r
+ bh=Nk9qSsV13rH9ksiPaNrgobxy8BptzObp6zJBmAkG/7I=;\r
+ h=Received:Received:Received:Received:From:To:Subject:Date:\r
+ Message-Id;\r
+ b=iF+188BtyIejbWUHDiV2hqoqZbnQ7E0m2CMJ8jHgvieHCwLdiR0yvvTEZ78j98/mv\r
+ r00UTGUT0hzJ4z3Rve6l9F+iZr5JfvsV4HSxoTFLCK7Yts65u9qUcrmi7c6phyMzdl\r
+ kV/aoFPT1tG5Vs81jBx8uVCIWnPNVNvsFEcX/7HW67xe77tlLJU8Ss3Zwam7Rh0dA9\r
+ 3lkFVv9dFDLxjgtvMjJNijK8G8WkrB2Dz39fqEOUcuwFR1BC3GpBNdFjVxbcGNyo2Y\r
+ 9Il/h3Zr4CPLKM9GJ46EHfa0pKFzHp+g6RtThtKKeHEvJM3j+Y6og0Xe3r4oGteHW0\r
+ c8LDdfDfPo33Q==\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://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: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 02 Jan 2016 06:10:23 -0000\r
+\r
+We already have a 'filename' variable with the name, so stay DRY and\r
+use that variable here.\r
+\r
+Also fix a missing-whitespace error from bed8b674 (nmbug-status:\r
+Clarify errors for illegible configs, 2014-05-10), wrapping on the\r
+sentence to match similar error-generation earlier in this function.\r
+---\r
+ devel/nmbug/nmbug-status | 6 +++---\r
+ 1 file changed, 3 insertions(+), 3 deletions(-)\r
+\r
+diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status\r
+index b36b6ad..22e3b5b 100755\r
+--- a/devel/nmbug/nmbug-status\r
++++ b/devel/nmbug/nmbug-status\r
+@@ -109,9 +109,9 @@ def read_config(path=None, encoding=None):\r
+         status = p.wait()\r
+         if status != 0:\r
+             raise ConfigError(\r
+-                ("Missing status-config.json in branch '{branch}' of"\r
+-                 '{nmbgit}.  Add the file or explicitly set --config.'\r
+-                ).format(branch=branch, nmbgit=nmbhome))\r
++                ("Missing {filename} in branch '{branch}' of {nmbgit}.  "\r
++                 'Add the file or explicitly set --config.'\r
++                ).format(filename=filename, branch=branch, nmbgit=nmbhome))\r
\r
+     config_json = config_bytes.decode(encoding)\r
+     try:\r
+-- \r
+2.1.0.60.g85f0837\r
+\r