[PATCHv3,1/4] knotty.py: Improve the message while waiting for running tasks to finish

Message ID 20220308143233.19972-1-pkj@axis.com
State Accepted, archived
Commit 57396289f935892390c11afe95f3eede28fd80e7
Headers show
Series [PATCHv3,1/4] knotty.py: Improve the message while waiting for running tasks to finish | expand

Commit Message

Peter Kjellerstedt March 8, 2022, 2:32 p.m. UTC
From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>

Use pluralise() to correct the grammar, and drop the colon at the end if
runnning in quiet mode.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---

PATCHv2: No changes.
PATCHv3: No changes.

 bitbake/lib/bb/ui/knotty.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Patch

diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index b02e59c1fe..a520895da2 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -272,7 +272,10 @@  class TerminalFilter(object):
                     tasks.append("%s (pid %s)" % (activetasks[t]["title"], activetasks[t]["pid"]))
 
         if self.main.shutdown:
-            content = "Waiting for %s running tasks to finish:" % len(activetasks)
+            content = pluralise("Waiting for %s running task to finish",
+                                "Waiting for %s running tasks to finish", len(activetasks))
+            if not self.quiet:
+                content += ':'
             print(content)
         else:
             if self.quiet: