summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-04-13 11:44:25 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-29 13:17:40 +0100
commit5c3b0c139143ffd68033afa93421164f89703426 (patch)
tree1e3d3ccdf4f5eddd0a06083829d55bd4f0a7d4bb
parentfe083b674b20b254877a6d8249b11c9a7373866e (diff)
downloadbitbake-5c3b0c139143ffd68033afa93421164f89703426.tar.gz
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 <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/runqueue.py2
1 files changed, 1 insertions, 1 deletions
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