summaryrefslogtreecommitdiff
path: root/gr-utils/modtool/cli/newmod.py
diff options
context:
space:
mode:
Diffstat (limited to 'gr-utils/modtool/cli/newmod.py')
-rw-r--r--gr-utils/modtool/cli/newmod.py7
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: