From d8ef08c96b12645f44f4c24b3264f2b2ee40161c Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sun, 13 Apr 2014 11:44:25 +0100 Subject: bitbake: runqueue: Fix handling of zero priority task The zero priority task should be run first but was being confused with the None value the priority field defaulted to. Check for None explicitly to avoid this error. In the real world this doesn't change much but it confused the debug output from the schedulers. (Bitbake rev: 49c9d8c9400f74c804c2f36462639236e0841ff0) Signed-off-by: Richard Purdie --- bitbake/lib/bb/runqueue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bitbake/lib/bb/runqueue.py') diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 6372b65fd9..274ccf2673 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py @@ -139,7 +139,7 @@ class RunQueueScheduler(object): bestprio = None for taskid in self.buildable: prio = self.rev_prio_map[taskid] - if not bestprio or bestprio > prio: + if bestprio is None or bestprio > prio: stamp = self.stamps[taskid] if stamp in self.rq.build_stamps.itervalues(): continue -- cgit v1.2.3-54-g00ecf