[PATCH v3 21/29] patman: Fix spelling of plural for warning
Simon Glass
sjg at chromium.org
Fri Oct 30 14:46:30 AEDT 2020
Tidy up the extra 's' when there is only a single warning. Fix the empty
print statement also.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
(no changes since v1)
tools/patman/patchstream.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py
index 1cb4d6ed0dd..cf6a6c6fc3e 100644
--- a/tools/patman/patchstream.py
+++ b/tools/patman/patchstream.py
@@ -665,12 +665,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
--
2.29.1.341.ge80a0c044ae-goog
More information about the Patchwork
mailing list