]> 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)
committerSteve Sakoman <steve@sakoman.com>
Thu, 30 Mar 2023 14:10:26 +0000 (04:10 -1000)
commit6c9ca2f2de98c84d11beccbfde7c1e26cb25dfb6
tree19bb7fdadf1e7e5c4f39096a839d8bbcadef8224
parent6134af5739c8a373db709bdbe2ba897d1ccaf39a
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>
(cherry picked from commit 701d985aa8f2e9c2b9c0736fa25b424f3701889e)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
scripts/lib/buildstats.py