| Message ID | 20260127160508.3392732-8-rob.woolley@windriver.com |
|---|---|
| State | New |
| Headers | show |
| Series | Package bitbake-setup for PyPI | expand |
On Tue, 27 Jan 2026 at 17:05, Rob Woolley via lists.openembedded.org <rob.woolley=windriver.com@lists.openembedded.org> wrote: > > The ruff lint tool reported that stdout was never used: > > F841 Local variable `stdout` is assigned to but never used > > Signed-off-by: Rob Woolley <rob.woolley@windriver.com> > --- > bin/bitbake-setup | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/bin/bitbake-setup b/bin/bitbake-setup > index 59412588..e3e577e9 100755 > --- a/bin/bitbake-setup > +++ b/bin/bitbake-setup > @@ -583,7 +583,7 @@ def init_config(top_dir, settings, args): > create_siteconf(top_dir, args.non_interactive, settings) > > d = init_bb_cache(top_dir, settings, args) > - stdout = sys.stdout > + > def handle_task_progress(event, d): > rate = event.rate if event.rate else '' > progress = event.progress if event.progress > 0 else 0 The next line is print("{}% {} ".format(progress, rate), file=stdout, end='\r') So stdout is used. We can't simply supply sys.stdout, as do_fetch does tricks with it to redirect the logs into a file (otherwise they would clutter the console). Alex
Hi Alex That's cool. We can drop the patch. I checked upstream and don't see the line you mentioned on the master branch: https://github.com/openembedded/bitbake/blob/master/bin%2Fbitbake-setup#L583 Should I be looking at a development repo or -next branch? I want to make sure to rebase any future patches against that. Cheers, Rob Get Outlook for Android<https://aka.ms/AAb9ysg>
On Wed, 28 Jan 2026 at 14:21, Woolley, Rob <Rob.Woolley@windriver.com> wrote: > That's cool. We can drop the patch. > > I checked upstream and don't see the line you mentioned on the master branch: https://github.com/openembedded/bitbake/blob/master/bin%2Fbitbake-setup#L583 > > Should I be looking at a development repo or -next branch? I want to make sure to rebase any future patches against that. Ah, I was looking at my own outdated code. The patch is okay. Alex
diff --git a/bin/bitbake-setup b/bin/bitbake-setup index 59412588..e3e577e9 100755 --- a/bin/bitbake-setup +++ b/bin/bitbake-setup @@ -583,7 +583,7 @@ def init_config(top_dir, settings, args): create_siteconf(top_dir, args.non_interactive, settings) d = init_bb_cache(top_dir, settings, args) - stdout = sys.stdout + def handle_task_progress(event, d): rate = event.rate if event.rate else '' progress = event.progress if event.progress > 0 else 0
The ruff lint tool reported that stdout was never used: F841 Local variable `stdout` is assigned to but never used Signed-off-by: Rob Woolley <rob.woolley@windriver.com> --- bin/bitbake-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)