From: "W. Trevor King" <wking@tremily.us>
To: notmuch@notmuchmail.org
Cc: David Bremner <david@tethera.net>,
Tomi Ollila <tomi.ollila@iki.fi>, Jani Nikula <jani@nikula.org>,
Carl Worth <cworth@cworth.org>,
"W. Trevor King" <wking@tremily.us>
Subject: [PATCH 1/5] nmbug-status: Avoid hard-coded filename in error message
Date: Fri, 1 Jan 2016 22:08:01 -0800 [thread overview]
Message-ID: <ed234b4fca39d9a471ee50f845233f025dc1163e.1451714099.git.wking@tremily.us> (raw)
In-Reply-To: <cover.1451714099.git.wking@tremily.us>
In-Reply-To: <cover.1451714099.git.wking@tremily.us>
We already have a 'filename' variable with the name, so stay DRY and
use that variable here.
Also fix a missing-whitespace error from bed8b674 (nmbug-status:
Clarify errors for illegible configs, 2014-05-10), wrapping on the
sentence to match similar error-generation earlier in this function.
---
devel/nmbug/nmbug-status | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
index b36b6ad..22e3b5b 100755
--- a/devel/nmbug/nmbug-status
+++ b/devel/nmbug/nmbug-status
@@ -109,9 +109,9 @@ def read_config(path=None, encoding=None):
status = p.wait()
if status != 0:
raise ConfigError(
- ("Missing status-config.json in branch '{branch}' of"
- '{nmbgit}. Add the file or explicitly set --config.'
- ).format(branch=branch, nmbgit=nmbhome))
+ ("Missing {filename} in branch '{branch}' of {nmbgit}. "
+ 'Add the file or explicitly set --config.'
+ ).format(filename=filename, branch=branch, nmbgit=nmbhome))
config_json = config_bytes.decode(encoding)
try:
--
2.1.0.60.g85f0837
next prev parent reply other threads:[~2016-01-02 6:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-02 6:08 [PATCH 0/5] notmuch-report: Rename from nmbug-status and add man pages W. Trevor King
2016-01-02 6:08 ` W. Trevor King [this message]
2016-01-07 13:27 ` [PATCH 1/5] nmbug-status: Avoid hard-coded filename in error message David Bremner
2016-01-02 6:08 ` [PATCH 2/5] notmuch-report: Rename from nmbug-status W. Trevor King
2016-01-03 16:19 ` Jani Nikula
2016-01-02 6:08 ` [PATCH 3/5] notmuch-report.json: Rename from status-config.json W. Trevor King
2016-01-02 6:08 ` [PATCH 4/5] notmuch-report: Add notmuch-report(1) and notmuch-report.json(5) man pages W. Trevor King
2016-01-02 6:08 ` [PATCH 5/5] NEWS: Document the notmuch-report branch W. Trevor King
2016-03-24 10:52 ` David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ed234b4fca39d9a471ee50f845233f025dc1163e.1451714099.git.wking@tremily.us \
--to=wking@tremily.us \
--cc=cworth@cworth.org \
--cc=david@tethera.net \
--cc=jani@nikula.org \
--cc=notmuch@notmuchmail.org \
--cc=tomi.ollila@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).