diff options
author | Josh Morman <jmorman@perspectalabs.com> | 2019-07-17 16:39:07 -0400 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2020-01-03 23:04:29 -0800 |
commit | 7d3c207e66f387151c9f0771e1bce3d735fbc507 (patch) | |
tree | a48ff7e4308d0eeb1295c46a3eb7091404233bd4 /gr-utils/python | |
parent | fddb0d4ebe36516ee7caa3ebf25cf411b62db6c0 (diff) |
modtool: prevent tagged_stream under python
Currently tagged stream blocks are not implemented
for python in modtool. There is a nasty exception
that happens, so this is intended to validate
and throw the appropriate exception before
trying to generate the block
Addresses #2489
Diffstat (limited to 'gr-utils/python')
-rw-r--r-- | gr-utils/python/modtool/core/add.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gr-utils/python/modtool/core/add.py b/gr-utils/python/modtool/core/add.py index 03587b28db..a64f21af3c 100644 --- a/gr-utils/python/modtool/core/add.py +++ b/gr-utils/python/modtool/core/add.py @@ -67,6 +67,8 @@ class ModToolAdd(ModTool): raise ModToolException('Programming language not specified.') if self.info['lang'] not in self.language_candidates: raise ModToolException('Invalid programming language.') + if self.info['blocktype'] == 'tagged_stream' and self.info['lang'] == 'python': + raise ModToolException('Tagged Stream Blocks for Python currently unsupported') if self.info['blockname'] is None: raise ModToolException('Blockname not specified.') if not re.match('^[a-zA-Z0-9_]+$', self.info['blockname']): @@ -127,10 +129,10 @@ class ModToolAdd(ModTool): def run(self): """ Go, go, go. """ - # This portion will be covered by the CLI - if not self.cli: - self.validate() - self.assign() + + # Some validation covered by the CLI - validate all parameters here + self.validate() + self.assign() has_swig = ( self.info['lang'] == 'cpp' |