]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
scripts/lib/buildstats: handle top-level build_stats not being complete
authorRoss Burton <ross.burton@arm.com>
Thu, 23 Mar 2023 12:54:04 +0000 (12:54 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 25 Mar 2023 09:39:26 +0000 (09:39 +0000)
commit701d985aa8f2e9c2b9c0736fa25b424f3701889e
treebc555008a98d89961c07eed0c2b7654ef20e220a
parent42661a59cda164b2d236ffc35b4d8cf43312b677
scripts/lib/buildstats: handle top-level build_stats not being complete

If we try to parse a buildstats directory which was either aborted or
is still being built then the top-level build_stats file doesn't
contain an elapsed value which causes an exception:

UnboundLocalError: local variable 'elapsed' referenced before assignment

Default both start and elapsed to 0 so that the parse succeeds.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
scripts/lib/buildstats.py