diff options
author | Johnathan Corgan <johnathan@corganlabs.com> | 2016-07-25 08:33:08 -0700 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2016-07-25 08:33:08 -0700 |
commit | 38be5bcc7928dd5f9ff19277c2bb12a3972e4c9a (patch) | |
tree | db4dfe18cab09c213043922eee06bbb0e56a0f53 /gr-utils/python/utils/grcc | |
parent | 8843ffdf4b10c47acf843133af9491ab15ac72d4 (diff) | |
parent | 1c122cbb5cdb1a979fc60e81646a39cbe7b89adf (diff) |
Merge branch 'master' into next
Diffstat (limited to 'gr-utils/python/utils/grcc')
-rwxr-xr-x | gr-utils/python/utils/grcc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gr-utils/python/utils/grcc b/gr-utils/python/utils/grcc index 776af799d3..e93802f051 100755 --- a/gr-utils/python/utils/grcc +++ b/gr-utils/python/utils/grcc @@ -26,16 +26,22 @@ from argparse import ArgumentParser 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): |