diff options
author | Josh Morman <jmorman@gnuradio.org> | 2021-11-24 12:43:14 -0500 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2021-11-24 14:41:53 -0500 |
commit | e6f61fba108fb40ad8103ef4fadbe507932695ab (patch) | |
tree | 354a7a48dc48f06f448ff842329074a50b3fca5c /gr-utils/modtool/cli/newmod.py | |
parent | 1bfc6b439dbcdc467bbbed43a9fd71b49524c348 (diff) |
utils: pep8 formatting
Signed-off-by: Josh Morman <jmorman@gnuradio.org>
Diffstat (limited to 'gr-utils/modtool/cli/newmod.py')
-rw-r--r-- | gr-utils/modtool/cli/newmod.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gr-utils/modtool/cli/newmod.py b/gr-utils/modtool/cli/newmod.py index 80194ff995..c5d91a9557 100644 --- a/gr-utils/modtool/cli/newmod.py +++ b/gr-utils/modtool/cli/newmod.py @@ -18,6 +18,7 @@ from gnuradio import gr from ..core import ModToolNewModule, validate_name from .base import common_params, run, cli_input, ModToolException + @click.command('newmod', short_help=ModToolNewModule.description) @click.option('--srcdir', help="Source directory for the module template.") @@ -37,15 +38,17 @@ def cli(**kwargs): try: os.stat(self.dir) except OSError: - pass # This is what should happen + pass # This is what should happen else: raise ModToolException('The given directory exists.') if self.srcdir is None: - self.srcdir = os.path.join(gr.prefix(),'share','gnuradio','modtool','templates','gr-newmod') + self.srcdir = os.path.join( + gr.prefix(), 'share', 'gnuradio', 'modtool', 'templates', 'gr-newmod') if not os.path.isdir(self.srcdir): raise ModToolException('Could not find gr-newmod source dir.') run(self) + def get_modname(self): """ Get the name of the new module to be added """ if self.info['modname'] is None: |