]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
patman: Fix spelling of plural for warning
authorSimon Glass <sjg@chromium.org>
Fri, 30 Oct 2020 03:46:30 +0000 (21:46 -0600)
committerSimon Glass <sjg@chromium.org>
Thu, 5 Nov 2020 16:11:31 +0000 (09:11 -0700)
Tidy up the extra 's' when there is only a single warning. Fix the empty
print statement also.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/patman/patchstream.py

index 1cb4d6ed0ddd45b9fd3bf0f72839945add4c7895..b3a25d59d1146cc6b6e8b47ec3220b31017ba901 100644 (file)
@@ -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 patch%s' % (count, 'es' if count > 1 else ''))
 
 def insert_cover_letter(fname, series, count):
     """Inserts a cover letter with the required info into patch 0