From 5c3b0c139143ffd68033afa93421164f89703426 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sun, 13 Apr 2014 11:44:25 +0100 Subject: 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 --- lib/bb/runqueue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py index 6372b65fd..274ccf267 100644 --- a/lib/bb/runqueue.py +++ b/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 1.2.3-korg