diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/report-error.bbclass | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/meta/classes/report-error.bbclass b/meta/classes/report-error.bbclass index 8b30422edf..5f155e332b 100644 --- a/meta/classes/report-error.bbclass +++ b/meta/classes/report-error.bbclass @@ -47,9 +47,13 @@ python errorreport_handler () { taskdata['package'] = e.data.expand("${PF}") taskdata['task'] = task if log: - logFile = open(log, 'r') - taskdata['log'] = logFile.read() - logFile.close() + try: + logFile = open(log, 'r') + taskdata['log'] = logFile.read().decode('utf-8') + logFile.close() + except: + taskdata['log'] = "Unable to read log file" + else: taskdata['log'] = "No Log" jsondata = json.loads(errorreport_getdata(e)) |