diff options
author | Elliot Smith <elliot.smith@intel.com> | 2015-12-22 16:06:56 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-12-22 16:15:36 +0000 |
commit | a6f8a3f12ef0a6f7fe4123b8854848a4c6cf94c7 (patch) | |
tree | 5e6d95eec9419d72c8cc927227749a86153c6b2f /meta/classes/toaster.bbclass | |
parent | 937b7fd44753fe1cc5a73e0810d02f9c422a0669 (diff) | |
download | poky-a6f8a3f12ef0a6f7fe4123b8854848a4c6cf94c7.tar.gz |
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>
Diffstat (limited to 'meta/classes/toaster.bbclass')
-rw-r--r-- | meta/classes/toaster.bbclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass index 4fb52a969e..bbda2f8433 100644 --- a/meta/classes/toaster.bbclass +++ b/meta/classes/toaster.bbclass | |||
@@ -212,10 +212,10 @@ python toaster_collect_task_stats() { | |||
212 | cpu_usage = str(statinfo["CPU usage"]).strip('% \n\r') | 212 | cpu_usage = str(statinfo["CPU usage"]).strip('% \n\r') |
213 | 213 | ||
214 | if "IO write_bytes" in statinfo: | 214 | if "IO write_bytes" in statinfo: |
215 | disk_io = disk_io + str(statinfo["IO write_bytes"]).strip('% \n\r') | 215 | disk_io = disk_io + int(statinfo["IO write_bytes"].strip('% \n\r')) |
216 | 216 | ||
217 | if "IO read_bytes" in statinfo: | 217 | if "IO read_bytes" in statinfo: |
218 | disk_io = disk_io + str(statinfo["IO read_bytes"]).strip('% \n\r') | 218 | disk_io = disk_io + int(statinfo["IO read_bytes"].strip('% \n\r')) |
219 | 219 | ||
220 | if "Started" in statinfo: | 220 | if "Started" in statinfo: |
221 | started = str(statinfo["Started"]).strip('% \n\r') | 221 | started = str(statinfo["Started"]).strip('% \n\r') |