diff options
Diffstat (limited to 'grc/python/Generator.py')
-rw-r--r-- | grc/python/Generator.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/grc/python/Generator.py b/grc/python/Generator.py index ddd32ca355..d688beba15 100644 --- a/grc/python/Generator.py +++ b/grc/python/Generator.py @@ -181,10 +181,14 @@ class TopBlockGenerator(object): blocks = filter(lambda b: b not in (imports + parameters), blocks) for block in blocks: - if block.get_key() == 'epy_block': - file_path = os.path.join(self._dirname, block.get_id() + '.py') + key = block.get_key() + file_path = os.path.join(self._dirname, block.get_id() + '.py') + if key == 'epy_block': src = block.get_param('_source_code').get_value() output.append((file_path, src)) + elif key == 'epy_module': + src = block.get_param('source_code').get_value() + output.append((file_path, src)) # Filter out virtual sink connections cf = lambda c: not (c.is_bus() or c.is_msg() or c.get_sink().get_parent().is_virtual_sink()) |