From patchwork Mon Oct 26 01:04:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1387383 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=fCHSNbH8; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CKGvd4tnrz9sT6 for ; Mon, 26 Oct 2020 12:09:33 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6D94F8253F; Mon, 26 Oct 2020 02:06:06 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="fCHSNbH8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BEE0E824CC; Mon, 26 Oct 2020 02:05:26 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8AD54824C5 for ; Mon, 26 Oct 2020 02:05:22 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x134.google.com with SMTP id y17so6763743ilg.4 for ; Sun, 25 Oct 2020 18:05:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=C5pmi88bhs/DsmjiEszIgyqGkvFuOA14kJ8OAX4AqFA=; b=fCHSNbH8sJYQddHAT8sFbgB/EfCHwPDXQUHuOwHcsh1eFJNNyRD6GXuMrnn9XIcJe8 Q/AiUsRBVR5Z/eN6HxwjgDGqwU+9ZpQ46u/RRxiiZ9O4D6pR+oyZfSK8diQLDwr7prLa NBU7DukQbw+FyAqvLiZOpHIUWKwAXUz6Ur5XE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=C5pmi88bhs/DsmjiEszIgyqGkvFuOA14kJ8OAX4AqFA=; b=SgAXrgmuv/Wt53qAEfb+dyKyJPC4GpCm6TW+cBxFp/k7lUeloxpR/lXJEBziJ/VPgi cB1Qkyl+fZepYqmHzPoPyemCks2ywKCkTz1Th8xryeQ6xJ4iGfUt/YpCQRT10VyHLquA i+V4Wu+mtbECOEW8Y2+uOh+Zx9FrDRAeJ56JBx8+YS3gItDEaBS1jofjFRaA4IhSSWjP FgvwQ46OUoPxS2ikMsQpVfV6DZNYUuyvcntASXWJPQGJU4/U4RdMKvIVhPzPcMbierC7 zQXpv4Z7hi6c0GxRjxNDzBZ+LbXHjfkA13Qtco+FKDZArKnvWC59q0LQtrZGJ4HpfVKQ bfDw== X-Gm-Message-State: AOAM5338g1O3MhSfaxcSMGwBUF9lNlQ1xxTzL6jna1GUVV/cCovKUdFH huzm0jz3x+hsiE6hlzeXhouNEG3s90/XoVja X-Google-Smtp-Source: ABdhPJxkgwU0OgrDM9nntUqULxkX5bDaNHRIUohdIY0u4/9VvY8H4HTFy97Y6Jtitc8KVx3x7km47A== X-Received: by 2002:a92:d6cf:: with SMTP id z15mr9517938ilp.82.1603674321245; Sun, 25 Oct 2020 18:05:21 -0700 (PDT) Received: from localhost.localdomain (c-73-14-175-90.hsd1.co.comcast.net. [73.14.175.90]) by smtp.gmail.com with ESMTPSA id a6sm5231162ili.11.2020.10.25.18.05.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Oct 2020 18:05:20 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Doug Anderson , patchwork@lists.ozlabs.org, Simon Glass Subject: [PATCH v2 22/30] patman: Fix spelling of plural for warning Date: Sun, 25 Oct 2020 19:04:34 -0600 Message-Id: <20201026010442.1606893-23-sjg@chromium.org> X-Mailer: git-send-email 2.29.0.rc2.309.g374f81d7ae-goog In-Reply-To: <20201026010442.1606893-1-sjg@chromium.org> References: <20201026010442.1606893-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean Tidy up the extra 's' when there is only a single warning. Fix the empty print statement also. Signed-off-by: Simon Glass --- (no changes since v1) tools/patman/func_test.py | 5 +++-- tools/patman/patchstream.py | 9 +++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tools/patman/func_test.py b/tools/patman/func_test.py index 5732c674817..702ec407b7f 100644 --- a/tools/patman/func_test.py +++ b/tools/patman/func_test.py @@ -216,10 +216,11 @@ class TestFunctional(unittest.TestCase): os.remove(cc_file) lines = iter(out[0].getvalue().splitlines()) - self.assertIn('1 warnings for', next(lines)) + self.assertIn('1 warning for', next(lines)) self.assertEqual( - "\t Tag 'Commit-notes' should be before sign-off / Change-Id", + "\tTag 'Commit-notes' should be before sign-off / Change-Id", next(lines)) + self.assertEqual('', next(lines)) self.assertEqual('Cleaned %s patches' % len(series.commits), next(lines)) self.assertEqual('Change log missing for v2', next(lines)) diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py index 75b074a0185..b88a546b863 100644 --- a/tools/patman/patchstream.py +++ b/tools/patman/patchstream.py @@ -687,12 +687,13 @@ def fix_patches(series, fnames): cmt.count = count result = fix_patch(backup_dir, fname, series, cmt) if result: - print('%d warnings for %s:' % (len(result), fname)) + print('%d warning%s for %s:' % + (len(result), 's' if len(result) > 1 else '', fname)) for warn in result: - print('\t', warn) - print + print('\t%s' % warn) + print() count += 1 - print('Cleaned %d patches' % count) + print('Cleaned %d patche%s' % (count, 's' if count > 1 else '')) def insert_cover_letter(fname, series, count): """Inserts a cover letter with the required info into patch 0