summaryrefslogtreecommitdiff
path: root/ick2/buildgraph.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2018-05-25 20:46:35 +0300
committerLars Wirzenius <liw@liw.fi>2018-05-28 18:18:38 +0300
commitf18a394d0279cf2dc3a768a0470fea2201cad016 (patch)
treec57d671f0e32056a5db6fac60d3bbe90b2187e9b /ick2/buildgraph.py
parent7a4c92e7171d642a1e1fce324441710ad4d44ce9 (diff)
downloadick2-f18a394d0279cf2dc3a768a0470fea2201cad016.tar.gz
Add: BuildGraph.has_more_to_do method, refactor
Diffstat (limited to 'ick2/buildgraph.py')
-rw-r--r--ick2/buildgraph.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/ick2/buildgraph.py b/ick2/buildgraph.py
index ddcfbfb..ee52e46 100644
--- a/ick2/buildgraph.py
+++ b/ick2/buildgraph.py
@@ -40,6 +40,13 @@ class BuildGraph:
self.actions[action_id]['status'] = status
self.trigger_observer()
+ def has_more_to_do(self):
+ return (
+ self.find_actions('ready') or
+ self.find_actions('building') or
+ self.find_actions('blocked')
+ )
+
def unblock(self):
blocked_ids = self.find_actions('blocked')
for blocked_id in blocked_ids: