toaster: fix if USER_CLASSES is missing buildstats
PATCH 1/1 toaster: fix if USER_CLASSES is missing buildstats
buildstats not being in USER_CLASSES is no reason to fail every single task in toaster_collect_task_stats: using a non-existing variable results in a None argument to os.path.join().
Check the variable availability before trying to use it.
Signed-off-by Olaf Mandel <[email protected]>
--- meta/classes/toaster.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes/toaster.bbclass +2 -2
@@ -157,11 +157,11 @@ python toaster_collect_task_stats() { import bb.utils import os - toaster_statlist_file = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), "toasterstatlist") - if not e.data.getVar('BUILDSTATS_BASE', True): return # if we don't have buildstats, we cannot collect stats + toaster_statlist_file = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), "toasterstatlist") + def stat_to_float(value): return float(value.strip('% \n\r'))
Signature · 1 line
2.1.4
Sorry about the original email: I accidentally sent it to the wrong mailing list... Please ignore it here.