[PATCH 2/2] test.py: check ubconfig exists before using it
Simon Glass
sjg at chromium.org
Tue Nov 25 23:41:23 CET 2025
Hi David,
On Tue, 25 Nov 2025 at 15:29, David Lechner <dlechner at baylibre.com> wrote:
>
> On 11/25/25 4:14 PM, Simon Glass wrote:
> > Hi David,
> >
>
> ...
>
> >> diff --git a/test/py/conftest.py b/test/py/conftest.py
> >> index 8ce680a92a0c37f36489b0782921d6cf4078850d..f889e3d3ae26db3ae19f79e236a281471d4b6de9 100644
> >> --- a/test/py/conftest.py
> >> +++ b/test/py/conftest.py
> >> @@ -613,7 +613,7 @@ def show_timings():
> >> if too_long:
> >> show_bar(f'>{get_time_delta(max_dur)}', too_long_msecs, too_long)
> >> log.info(buf.getvalue())
> >> - if ubconfig.timing:
> >> + if "ubconfig" in globals() and ubconfig.timing:
> >> print(buf.getvalue(), end='')
> >
> > Please put 'ubconfig = None' at the top of the file, then this can be:
> >
> > if ubconfig.timing:
>
> I think you mean this?
>
> if ubconfig and ubconfig.timing?
>
Ah yes, thanks.
Regards,
Simon
More information about the U-Boot
mailing list