summaryrefslogtreecommitdiff
path: root/grc/python/convert_hier.py
diff options
context:
space:
mode:
Diffstat (limited to 'grc/python/convert_hier.py')
-rw-r--r--grc/python/convert_hier.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/grc/python/convert_hier.py b/grc/python/convert_hier.py
index c6ca5b769..b609af24a 100644
--- a/grc/python/convert_hier.py
+++ b/grc/python/convert_hier.py
@@ -62,6 +62,7 @@ def convert_hier(flow_graph, python_file):
sink_n['name'] = input_sig['label']
sink_n['type'] = input_sig['type']
sink_n['vlen'] = input_sig['vlen']
+ if input_sig['optional']: sink_n['optional'] = '1'
block_n['sink'].append(sink_n)
#source data
block_n['source'] = list()
@@ -70,9 +71,11 @@ def convert_hier(flow_graph, python_file):
source_n['name'] = output_sig['label']
source_n['type'] = output_sig['type']
source_n['vlen'] = output_sig['vlen']
+ if output_sig['optional']: source_n['optional'] = '1'
block_n['source'].append(source_n)
#doc data
block_n['doc'] = "%s\n%s\n%s"%(block_author, block_desc, python_file)
+ block_n['grc_source'] = "%s"%(flow_graph.grc_file_path)
#write the block_n to file
xml_file = python_file + '.xml'
ParseXML.to_file({'block': block_n}, xml_file)