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: 1387405 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (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 4CKH3r6mSVz9sT6 for ; Mon, 26 Oct 2020 12:16:40 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (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 bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4CKH3r4s8JzDqMt for ; Mon, 26 Oct 2020 12:16:40 +1100 (AEDT) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=chromium.org (client-ip=2607:f8b0:4864:20::131; helo=mail-il1-x131.google.com; envelope-from=sjg@chromium.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: lists.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 mail-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4CKGpq2VQjzDqDG for ; Mon, 26 Oct 2020 12:05:23 +1100 (AEDT) Received: by mail-il1-x131.google.com with SMTP id q1so6752613ilt.6 for ; Sun, 25 Oct 2020 18:05:23 -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=Ku4NzFo7sNMv+25xP3ZSD9Bdk5EmXf5/ogYC3wNcExyPGN/gPOsLR+/tqCwG93fWHP fyc41lswSOMJJJibTgffGzWMijg9Lp4aG2HFCTstJflKMOvAucc2WQ1Vdst+VfDpkQLP 3eKQHEQAuVXVigmeXXGInt7DerUaOIGC3Jh7uSgyZ1v9fY+A1C5cINNJHhzeT6u/9QfM JfaJ5QPNB1pP86SveWLUUYMokdOzxr3TuYzvsYwHg8ygpSJY0QHlApSyoXV42I799GzO rhz/+7EbDomSs995jXY1vR3Ofm5knBVPP55ykclGArb/5nALXe2zJQCIv5jJ+EFm5apT RC3w== X-Gm-Message-State: AOAM531ICQxUtsrK3sEorD67+cPqLtpBt/PaeECKRUH1PeuMOGJtxV6R gBKKwgqgZy9ponbT1+zdQq7YPxHCVEs8sxXO 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 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: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Rini , Simon Glass , patchwork@lists.ozlabs.org Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" 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