[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnuradio-commit
Subject:    [Commit-gnuradio] [gnuradio] 04/04: grc: use repr for string-like param type in generator (fixes #92
From:       git () gnuradio ! org
Date:       2016-07-25 15:46:06
Message-ID: 20160725154607.01D821A82A9 () hertz ! gnuradio ! org
[Download RAW message or body]

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 <koslowski@kit.edu>
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:

_______________________________________________
Commit-gnuradio mailing list
Commit-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/commit-gnuradio
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic