toaster.bbclass: fix TypeError when parsing build stats

Reading IO stats fails because the IO read/write bytes are
being converted to strings, then added to a numeric running
total.

Fix this by converting IO stats to integers.

(From OE-Core rev: 8e2475eecafc0161d25684f5b8239273739de759)

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Elliot Smith 2015-12-22 16:06:56 +00:00 committed by Richard Purdie
parent 937b7fd447
commit a6f8a3f12e
1 changed files with 2 additions and 2 deletions

View File

@ -212,10 +212,10 @@ python toaster_collect_task_stats() {
cpu_usage = str(statinfo["CPU usage"]).strip('% \n\r')
if "IO write_bytes" in statinfo:
disk_io = disk_io + str(statinfo["IO write_bytes"]).strip('% \n\r')
disk_io = disk_io + int(statinfo["IO write_bytes"].strip('% \n\r'))
if "IO read_bytes" in statinfo:
disk_io = disk_io + str(statinfo["IO read_bytes"]).strip('% \n\r')
disk_io = disk_io + int(statinfo["IO read_bytes"].strip('% \n\r'))
if "Started" in statinfo:
started = str(statinfo["Started"]).strip('% \n\r')