* [PATCH] toaster.bbclass: Fix ValueError
@ 2015-07-27 10:55 Ed Bartosh
2015-07-27 11:33 ` Richard Purdie
0 siblings, 1 reply; 2+ messages in thread
From: Ed Bartosh @ 2015-07-27 10:55 UTC (permalink / raw)
To: openembedded-core
The reason for this exception was usage of ':' as a field
delimiter in toasterstatlist file. As target can optionally
contain ':<task>' suffix it caused split(':') to throw exception:
File "toaster_collect_task_stats(e)", line 71, in
toaster_collect_task_stats(e=<bb.event.BuildCompleted object at
0x7f8434deed50>)
ValueError: too many values to unpack
Fixed by changing delimiter ':' -> '::'
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.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 eeca9de..d63cff5 100644
--- a/meta/classes/toaster.bbclass
+++ b/meta/classes/toaster.bbclass
@@ -192,7 +192,7 @@ python toaster_collect_task_stats() {
bn = get_bn(e)
bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
taskdir = os.path.join(bsdir, e.data.expand("${PF}"))
- fout.write("%s:%s:%s:%s\n" % (e.taskfile, e.taskname, os.path.join(taskdir, e.task), e.data.expand("${PN}")))
+ fout.write("%s::%s::%s::%s\n" % (e.taskfile, e.taskname, os.path.join(taskdir, e.task), e.data.expand("${PN}")))
bb.utils.unlockfile(lock)
@@ -245,7 +245,7 @@ python toaster_collect_task_stats() {
events = []
with open(os.path.join(e.data.getVar('BUILDSTATS_BASE', True), "toasterstatlist"), "r") as fin:
for line in fin:
- (taskfile, taskname, filename, recipename) = line.strip().split(":")
+ (taskfile, taskname, filename, recipename) = line.strip().split("::")
events.append((taskfile, taskname, _read_stats(filename), recipename))
bb.event.fire(bb.event.MetadataEvent("BuildStatsList", events), e.data)
os.unlink(os.path.join(e.data.getVar('BUILDSTATS_BASE', True), "toasterstatlist"))
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] toaster.bbclass: Fix ValueError
2015-07-27 10:55 [PATCH] toaster.bbclass: Fix ValueError Ed Bartosh
@ 2015-07-27 11:33 ` Richard Purdie
0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2015-07-27 11:33 UTC (permalink / raw)
To: Ed Bartosh; +Cc: openembedded-core
On Mon, 2015-07-27 at 13:55 +0300, Ed Bartosh wrote:
> The reason for this exception was usage of ':' as a field
> delimiter in toasterstatlist file. As target can optionally
> contain ':<task>' suffix it caused split(':') to throw exception:
>
> File "toaster_collect_task_stats(e)", line 71, in
> toaster_collect_task_stats(e=<bb.event.BuildCompleted object at
> 0x7f8434deed50>)
> ValueError: too many values to unpack
>
> Fixed by changing delimiter ':' -> '::'
>
> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Since this is causing other blockages and is simple I've merged it,
thanks!
One thing I did tweak was mentioning in the commit message that "bitbake
xxx:do_yyy" triggers this.
Cheers,
Richard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-27 11:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-27 10:55 [PATCH] toaster.bbclass: Fix ValueError Ed Bartosh
2015-07-27 11:33 ` Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox