diff options
author | Volker Schroer <3470424+dl1ksv@users.noreply.github.com> | 2019-07-24 12:12:07 +0200 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2019-07-25 11:07:50 +0200 |
commit | dc50d014cf45dc4633a642b5d745e94bcd82a3d5 (patch) | |
tree | 4b9f2f04b9b1aa13842dd98b23e3ecd84bbadf93 /grc/core/FlowGraph.py | |
parent | 88eb8e874c7af57b4e53eea04acb13317752e28c (diff) |
Fix KeyError in variable blocks
variable blocks without a param value need to be updated otherwise the variable_block.namespace is wrong
Diffstat (limited to 'grc/core/FlowGraph.py')
-rw-r--r-- | grc/core/FlowGraph.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/grc/core/FlowGraph.py b/grc/core/FlowGraph.py index 7ee8e45f75..c2a5094541 100644 --- a/grc/core/FlowGraph.py +++ b/grc/core/FlowGraph.py @@ -223,8 +223,11 @@ class FlowGraph(Element): # Load variables for variable_block in self.get_variables(): try: + variable_block.rewrite() value = eval(variable_block.value, namespace, variable_block.namespace) namespace[variable_block.name] = value + except TypeError: #Type Errors may happen, but that desn't matter as they are displayed in the gui + pass except Exception: log.exception('Failed to evaluate variable block {0}'.format(variable_block.name), exc_info=True) pass |