diff options
author | jblum | 2009-01-22 01:00:12 +0000 |
---|---|---|
committer | jblum | 2009-01-22 01:00:12 +0000 |
commit | 76019d92265a85197d9d6bccfbbdb725a58d8d5a (patch) | |
tree | 214fb5e640741def3c50895e4fa07b1e783e4aa1 /grc/data/platforms | |
parent | fc9df36159a97fd691c585ce3c7556987aefe38a (diff) | |
download | gnuradio-76019d92265a85197d9d6bccfbbdb725a58d8d5a.tar.gz gnuradio-76019d92265a85197d9d6bccfbbdb725a58d8d5a.tar.bz2 gnuradio-76019d92265a85197d9d6bccfbbdb725a58d8d5a.zip |
params must exist for option parser
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10283 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'grc/data/platforms')
-rw-r--r-- | grc/data/platforms/python/flow_graph.tmpl | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/grc/data/platforms/python/flow_graph.tmpl b/grc/data/platforms/python/flow_graph.tmpl index a9256574c..3589e564c 100644 --- a/grc/data/platforms/python/flow_graph.tmpl +++ b/grc/data/platforms/python/flow_graph.tmpl @@ -179,15 +179,17 @@ class $(class_name)(gr.hier_block2): ######################################################## #if $generate_options != 'hb' if __name__ == '__main__': - parser = OptionParser() #set $args = list() - #for $param in $parameters - #if $param.get_param('type').get_value() + #if $parameters + parser = OptionParser() + #for $param in $parameters + #if $param.get_param('type').get_value() parser.add_option("--$param.get_id()", dest="$param.get_id()", type="$param.get_param('type').get_value()", default=$param.get_make()) - #silent $args.append('%s=options.%s'%($param.get_id(), $param.get_id())) - #end if - #end for + #silent $args.append('%s=options.%s'%($param.get_id(), $param.get_id())) + #end if + #end for (options, args) = parser.parse_args() + #end if tb = $(class_name)($(', '.join($args))) #if $generate_options == 'wx_gui' tb.Run() |