[OE-core] [PATCH] toaster: fix if USER_CLASSES is missing buildstats
Olaf Mandel
o.mandel at menlosystems.com
Thu Oct 27 16:37:43 UTC 2016
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 <o.mandel at menlosystems.com>
---
meta/classes/toaster.bbclass | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass
index 4bddf34..638bb39 100644
--- a/meta/classes/toaster.bbclass
+++ b/meta/classes/toaster.bbclass
@@ -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'))
--
2.1.4
More information about the Openembedded-core
mailing list