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.man...@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

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to