summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Freire <igor@blockstream.com>2020-01-18 11:08:19 -0300
committerdevnulling <devnulling@users.noreply.github.com>2020-02-15 11:10:41 -0800
commit35b3bbc8ed2fa08c2d3cef7428439dcffee5c2b4 (patch)
tree34470ad40a6c9b17929901357fac50f7b847e86e
parent504ab76d9e4fc3e9f497b9fd34f01c1bad346a5d (diff)
grc: Fix eng_float default on argparse template
The import of eng_notation was removed in 678a7c2ad, and so float parameter blocks were leading to flowgraph compilation error. Since eng_notation is still imported in the generated python script, we can put the call to num_to_str in the generated script, instead of calling it during script generation.
-rw-r--r--grc/core/generator/flow_graph.py.mako2
1 files changed, 1 insertions, 1 deletions
diff --git a/grc/core/generator/flow_graph.py.mako b/grc/core/generator/flow_graph.py.mako
index 3635c550db..81c7c33f78 100644
--- a/grc/core/generator/flow_graph.py.mako
+++ b/grc/core/generator/flow_graph.py.mako
@@ -331,7 +331,7 @@ def argument_parser():
default = param.templates.render('make')
if type_ == 'eng_float':
- default = '"' + eng_notation.num_to_str(float(default)) + '"'
+ default = "eng_notation.num_to_str(float(" + default + "))"
# FIXME:
if type_ == 'string':
type_ = 'str'