summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorChris Laplante <chris.laplante@agilent.com>2024-12-06 11:24:41 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-12-06 23:33:54 +0000
commitbfe176d6d57cfe934d7d8efc706247cf1f762702 (patch)
tree2092711a48b4b4a0f4a546aaeb2f317abc3e7c91 /bitbake/lib
parentc7b362f5ec380bea7dcce9790f739d3b507b4341 (diff)
downloadpoky-bfe176d6d57cfe934d7d8efc706247cf1f762702.tar.gz
bitbake: knotty: some small cleanups while I'm in here
+ missing imports + indentation fix + missing call to super __init__ + redundant parenthesis (Bitbake rev: 89613f4ba31377528d1934cc591fe33218bd916a) Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/ui/knotty.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index 881df9e5fb..2fff1b3669 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -24,6 +24,12 @@ import atexit
24from itertools import groupby 24from itertools import groupby
25 25
26from bb.ui import uihelper 26from bb.ui import uihelper
27import bb.build
28import bb.command
29import bb.cooker
30import bb.event
31import bb.runqueue
32import bb.utils
27 33
28featureSet = [bb.cooker.CookerFeatures.SEND_SANITYEVENTS, bb.cooker.CookerFeatures.BASEDATASTORE_TRACKING] 34featureSet = [bb.cooker.CookerFeatures.SEND_SANITYEVENTS, bb.cooker.CookerFeatures.BASEDATASTORE_TRACKING]
29 35
@@ -103,7 +109,7 @@ def new_progress(msg, maxval):
103 return NonInteractiveProgress(msg, maxval) 109 return NonInteractiveProgress(msg, maxval)
104 110
105def pluralise(singular, plural, qty): 111def pluralise(singular, plural, qty):
106 if(qty == 1): 112 if qty == 1:
107 return singular % qty 113 return singular % qty
108 else: 114 else:
109 return plural % qty 115 return plural % qty
@@ -112,6 +118,7 @@ def pluralise(singular, plural, qty):
112class InteractConsoleLogFilter(logging.Filter): 118class InteractConsoleLogFilter(logging.Filter):
113 def __init__(self, tf): 119 def __init__(self, tf):
114 self.tf = tf 120 self.tf = tf
121 super().__init__()
115 122
116 def filter(self, record): 123 def filter(self, record):
117 if record.levelno == bb.msg.BBLogFormatter.NOTE and (record.msg.startswith("Running") or record.msg.startswith("recipe ")): 124 if record.levelno == bb.msg.BBLogFormatter.NOTE and (record.msg.startswith("Running") or record.msg.startswith("recipe ")):
@@ -569,9 +576,9 @@ def main(server, eventHandler, params, tf = TerminalFilter):
569 loglink = os.path.join(consolelogdirname, 'console-latest.log') 576 loglink = os.path.join(consolelogdirname, 'console-latest.log')
570 bb.utils.remove(loglink) 577 bb.utils.remove(loglink)
571 try: 578 try:
572 os.symlink(os.path.basename(consolelogfile), loglink) 579 os.symlink(os.path.basename(consolelogfile), loglink)
573 except OSError: 580 except OSError:
574 pass 581 pass
575 582
576 # Add the logging domains specified by the user on the command line 583 # Add the logging domains specified by the user on the command line
577 for (domainarg, iterator) in groupby(params.debug_domains): 584 for (domainarg, iterator) in groupby(params.debug_domains):