diff options
Diffstat (limited to 'grc/python/Generator.py')
-rw-r--r-- | grc/python/Generator.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/grc/python/Generator.py b/grc/python/Generator.py index 2a2dfdd49..2a6fe51d5 100644 --- a/grc/python/Generator.py +++ b/grc/python/Generator.py @@ -57,8 +57,8 @@ class Generator(object): def write(self): #do throttle warning - all_keys = ' '.join(map(lambda b: b.get_key(), self._flow_graph.get_enabled_blocks())) - if ('usrp' not in all_keys) and ('uhd' not in all_keys) and ('audio' not in all_keys) and ('throttle' not in all_keys) and self._generate_options != 'hb': + throttled = any(map(lambda b: b.throttle(), self._flow_graph.get_enabled_blocks())) + if not throttled and self._generate_options != 'hb': Messages.send_warning('''\ This flow graph may not have flow control: no audio or usrp blocks found. \ Add a Misc->Throttle block to your flow graph to avoid CPU congestion.''') |