[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 03/04: utils: adapt grcc to refactored grc
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 03/04: utils: adapt grcc to refactored grc code |
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 df86a6bf1ec0a1e628eba5e916859ba38c7c769c
Author: Sebastian Koslowski <address@hidden>
Date: Wed Jul 6 17:11:31 2016 +0200
utils: adapt grcc to refactored grc code
---
gr-utils/python/utils/grcc | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/gr-utils/python/utils/grcc b/gr-utils/python/utils/grcc
index 82db543..b9bd155 100755
--- a/gr-utils/python/utils/grcc
+++ b/gr-utils/python/utils/grcc
@@ -26,16 +26,22 @@ from optparse import OptionParser
import warnings
warnings.simplefilter('ignore')
+from gnuradio import gr
+
try:
- from grc.python.Platform import Platform
+ from grc.core.Platform import Platform
except ImportError:
- from gnuradio.grc.python.Platform import Platform
+ from gnuradio.grc.core.Platform import Platform
class GRCC:
def __init__(self, grcfile, out_dir):
self.out_dir = out_dir
- self.platform = Platform()
+ self.platform = Platform(
+ prefs_file=gr.prefs(),
+ version=gr.version(),
+ version_parts=(gr.major_version(), gr.api_version(),
gr.minor_version())
+ )
data = self.platform.parse_flow_graph(grcfile)
self.fg = self.platform.get_new_flow_graph()
@@ -48,7 +54,7 @@ class GRCC:
["Validation failed:"] + self.fg.get_error_messages()
))
- self.gen = self.platform.get_generator()(self.fg, out_dir)
+ self.gen = self.platform.Generator(self.fg, out_dir)
self.gen.write()
def exec_program(self):