[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 04/04: grc: use repr for string-like param
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 04/04: grc: use repr for string-like param type in generator (fixes #926) |
Date: |
Mon, 25 Jul 2016 15:46:06 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch maint
in repository gnuradio.
commit 3e1a92f1643dff8eb53e2ae2c72e592be40a863c
Author: Sebastian Koslowski <address@hidden>
Date: Wed Jul 13 13:56:33 2016 +0200
grc: use repr for string-like param type in generator (fixes #926)
---
grc/core/Param.py | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/grc/core/Param.py b/grc/core/Param.py
index d155800..201032d 100644
--- a/grc/core/Param.py
+++ b/grc/core/Param.py
@@ -642,10 +642,8 @@ class Param(Element):
if t in ('string', 'file_open', 'file_save', '_multiline',
'_multiline_python_external'):
if not self._init:
self.evaluate()
- if self._stringify_flag:
- return '"%s"' % v.replace('"', '\"')
- else:
- return v
+ return repr(v) if self._stringify_flag else v
+
# Vector types
elif t in ('complex_vector', 'real_vector', 'float_vector',
'int_vector'):
if not self._init: