diff options
-rw-r--r-- | meta/classes/report-error.bbclass | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/meta/classes/report-error.bbclass b/meta/classes/report-error.bbclass index 5fe2355842c..8b30422edfa 100644 --- a/meta/classes/report-error.bbclass +++ b/meta/classes/report-error.bbclass @@ -44,11 +44,14 @@ python errorreport_handler () { task = e.task taskdata={} log = e.data.getVar('BB_LOGFILE', True) - logFile = open(log, 'r') taskdata['package'] = e.data.expand("${PF}") taskdata['task'] = task - taskdata['log'] = logFile.read() - logFile.close() + if log: + logFile = open(log, 'r') + taskdata['log'] = logFile.read() + logFile.close() + else: + taskdata['log'] = "No Log" jsondata = json.loads(errorreport_getdata(e)) jsondata['failures'].append(taskdata) errorreport_savedata(e, jsondata, "error-report.txt") |