diff mbox series

[4/6] build: localize import of bb.progress

Message ID 20260825194549.152553-4-chris.laplante@agilent.com
State New
Headers show
Series [1/6] data_smart: use Pattern.search instead of findall, to match comment | expand

Commit Message

chris.laplante@agilent.com Aug. 25, 2026, 7:45 p.m. UTC
From: Chris Laplante <chris.laplante@agilent.com>

It is only needed by create_progress_handler so just move it in there.
This resolves a circular import between bb.build and bb.progress (currently
being masked by the 'fetch' vs 'fetch2' shim in bb __init__.py) as well.

Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
---
 lib/bb/build.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/lib/bb/build.py b/lib/bb/build.py
index 40839a81b..8b49721d6 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -24,7 +24,6 @@  import datetime
 import bb
 import bb.msg
 import bb.process
-import bb.progress
 from io import StringIO
 from bb import data, event, utils
 
@@ -387,6 +386,7 @@  esac
 '''
 
 def create_progress_handler(func, progress, logfile, d):
+    import bb.progress
     if progress == 'percent':
         # Use default regex
         return bb.progress.BasicProgressHandler(d, outfile=logfile)