summaryrefslogtreecommitdiff
path: root/grc/base/FlowGraph.py
diff options
context:
space:
mode:
authorSebastian Koslowski <koslowski@kit.edu>2015-11-11 18:48:28 +0100
committerSebastian Koslowski <koslowski@kit.edu>2015-12-02 23:09:03 +0100
commitdf4f5820cea5c8786f118bf94adb950afe6b2aab (patch)
treeee002a6021e528c30a290a356261c1ef5ba2f0fb /grc/base/FlowGraph.py
parent7a0e28f2f0ba509119690e7f4f0a4e9adb21edf5 (diff)
grc: some clean-up
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 5d600e27dd..b904a84697 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):
"""