summaryrefslogtreecommitdiff
path: root/grc/core/params/param.py
diff options
context:
space:
mode:
Diffstat (limited to 'grc/core/params/param.py')
-rw-r--r--grc/core/params/param.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/grc/core/params/param.py b/grc/core/params/param.py
index 816588efe2..ef8d7df291 100644
--- a/grc/core/params/param.py
+++ b/grc/core/params/param.py
@@ -245,9 +245,13 @@ class Param(Element):
elif dtype in ('string', 'file_open', 'file_save', '_multiline', '_multiline_python_external'):
# Do not check if file/directory exists, that is a runtime issue
try:
- value = self.parent_flowgraph.evaluate(expr)
- if not isinstance(value, str):
- raise Exception()
+ # Do not evaluate multiline strings (code snippets or comments)
+ if dtype not in ['_multiline','_multiline_python_external']:
+ value = self.parent_flowgraph.evaluate(expr)
+ if not isinstance(value, str):
+ raise Exception()
+ else:
+ value = str(expr)
except Exception:
self._stringify_flag = True
value = str(expr)