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 B7D5C6DE1A57 for ; Fri, 1 Jan 2016 22:10:23 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: 0.041 X-Spam-Level: X-Spam-Status: No, score=0.041 tagged_above=-999 required=5 tests=[AWL=0.042, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] 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 8ytbZ-UPgtDy for ; Fri, 1 Jan 2016 22:10:22 -0800 (PST) Received: from resqmta-po-03v.sys.comcast.net (resqmta-po-03v.sys.comcast.net [96.114.154.162]) by arlo.cworth.org (Postfix) with ESMTPS id 3DBCD6DE1AE7 for ; Fri, 1 Jan 2016 22:10:00 -0800 (PST) Received: from resomta-po-09v.sys.comcast.net ([96.114.154.233]) by resqmta-po-03v.sys.comcast.net with comcast id 0uA01s00152QWKC01uA063; Sat, 02 Jan 2016 06:10:00 +0000 Received: from mail.tremily.us ([73.221.72.168]) by resomta-po-09v.sys.comcast.net with comcast id 0u7z1s0063dr3C901u7zQU; Sat, 02 Jan 2016 06:08:00 +0000 Received: from ullr.tremily.us (unknown [192.168.10.7]) by mail.tremily.us (Postfix) with ESMTPS id 22DBC1B2F57D; Fri, 1 Jan 2016 22:07:59 -0800 (PST) Received: (nullmailer pid 15179 invoked by uid 1000); Sat, 02 Jan 2016 06:08:07 -0000 From: "W. Trevor King" To: notmuch@notmuchmail.org Cc: David Bremner , Tomi Ollila , Jani Nikula , Carl Worth , "W. Trevor King" Subject: [PATCH 1/5] nmbug-status: Avoid hard-coded filename in error message Date: Fri, 1 Jan 2016 22:08:01 -0800 Message-Id: X-Mailer: git-send-email 2.1.0.60.g85f0837 In-Reply-To: References: In-Reply-To: References: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1451715000; bh=Nk9qSsV13rH9ksiPaNrgobxy8BptzObp6zJBmAkG/7I=; h=Received:Received:Received:Received:From:To:Subject:Date: Message-Id; b=iF+188BtyIejbWUHDiV2hqoqZbnQ7E0m2CMJ8jHgvieHCwLdiR0yvvTEZ78j98/mv r00UTGUT0hzJ4z3Rve6l9F+iZr5JfvsV4HSxoTFLCK7Yts65u9qUcrmi7c6phyMzdl kV/aoFPT1tG5Vs81jBx8uVCIWnPNVNvsFEcX/7HW67xe77tlLJU8Ss3Zwam7Rh0dA9 3lkFVv9dFDLxjgtvMjJNijK8G8WkrB2Dz39fqEOUcuwFR1BC3GpBNdFjVxbcGNyo2Y 9Il/h3Zr4CPLKM9GJ46EHfa0pKFzHp+g6RtThtKKeHEvJM3j+Y6og0Xe3r4oGteHW0 c8LDdfDfPo33Q== X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.20 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, 02 Jan 2016 06:10:23 -0000 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