summaryrefslogtreecommitdiff
path: root/grc/base/FlowGraph.py
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2015-12-07 16:03:50 -0800
committerJohnathan Corgan <johnathan@corganlabs.com>2015-12-07 16:03:50 -0800
commit7ec5e1385a70a7ddafa2fbdf9bd023757feedad9 (patch)
tree5b0aae2c2c60ef16ce0b01b2bfb05d09b5fce4a7 /grc/base/FlowGraph.py
parent6f31b6e1dbb8f2474f6d95418d09145b0ceeecac (diff)
parent9587f5b34914f8ccbb05db093a024cf117b60a44 (diff)
Merge branch 'master' into next
Diffstat (limited to 'grc/base/FlowGraph.py')
-rw-r--r--grc/base/FlowGraph.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/grc/base/FlowGraph.py b/grc/base/FlowGraph.py
index 5d600e27d..b904a8469 100644
--- a/grc/base/FlowGraph.py
+++ b/grc/base/FlowGraph.py
@@ -209,6 +209,12 @@ class FlowGraph(Element):
get_children = get_elements
+ def iter_enabled_blocks(self):
+ """
+ Get an iterator of all blocks that are enabled and not bypassed.
+ """
+ return ifilter(methodcaller('get_enabled'), self.iter_blocks())
+
def get_enabled_blocks(self):
"""
Get a list of all blocks that are enabled and not bypassed.
@@ -216,7 +222,7 @@ class FlowGraph(Element):
Returns:
a list of blocks
"""
- return filter(methodcaller('get_enabled'), self.iter_blocks())
+ return list(self.iter_enabled_blocks())
def get_bypassed_blocks(self):
"""