From bfe176d6d57cfe934d7d8efc706247cf1f762702 Mon Sep 17 00:00:00 2001 From: Chris Laplante Date: Fri, 6 Dec 2024 11:24:41 -0500 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/knotty.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'bitbake/lib/bb') 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 from itertools import groupby from bb.ui import uihelper +import bb.build +import bb.command +import bb.cooker +import bb.event +import bb.runqueue +import bb.utils featureSet = [bb.cooker.CookerFeatures.SEND_SANITYEVENTS, bb.cooker.CookerFeatures.BASEDATASTORE_TRACKING] @@ -103,7 +109,7 @@ def new_progress(msg, maxval): return NonInteractiveProgress(msg, maxval) def pluralise(singular, plural, qty): - if(qty == 1): + if qty == 1: return singular % qty else: return plural % qty @@ -112,6 +118,7 @@ def pluralise(singular, plural, qty): class InteractConsoleLogFilter(logging.Filter): def __init__(self, tf): self.tf = tf + super().__init__() def filter(self, record): 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): loglink = os.path.join(consolelogdirname, 'console-latest.log') bb.utils.remove(loglink) try: - os.symlink(os.path.basename(consolelogfile), loglink) + os.symlink(os.path.basename(consolelogfile), loglink) except OSError: - pass + pass # Add the logging domains specified by the user on the command line for (domainarg, iterator) in groupby(params.debug_domains): -- cgit v1.2.3-54-g00ecf