summaryrefslogtreecommitdiff
path: root/gr-utils/python/modtool/core/base.py
diff options
context:
space:
mode:
authorMarcus Müller <mmueller@gnuradio.org>2019-04-21 16:19:21 +0200
committerMarcus Müller <mmueller@gnuradio.org>2019-04-21 17:48:55 +0200
commitee1bef43e92a3d517a3310848c9eebaf18dfa329 (patch)
tree31b00aa57e91ae635357adcadbd7494d30685e0e /gr-utils/python/modtool/core/base.py
parentcbe60a36717f5d26b5eee6cc87ae4394cebbf427 (diff)
modtool core: Don't import CLI functionality unless CLI is used
This allows usage of scripted modtool on systems without click installed. Only with this, headless unit testing can be done without installing click.
Diffstat (limited to 'gr-utils/python/modtool/core/base.py')
-rw-r--r--gr-utils/python/modtool/core/base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gr-utils/python/modtool/core/base.py b/gr-utils/python/modtool/core/base.py
index 5d133892e6..f47fdd5ce6 100644
--- a/gr-utils/python/modtool/core/base.py
+++ b/gr-utils/python/modtool/core/base.py
@@ -33,7 +33,6 @@ from types import SimpleNamespace
from gnuradio import gr
from ..tools import get_modname, SCMRepoFactory
-from ..cli import setup_cli_logger
logger = logging.getLogger('gnuradio.modtool')
@@ -90,6 +89,7 @@ class ModTool(object):
self.info['yes'] = True
else:
self.info['yes'] = kwargs.get('yes', False)
+ from ..cli import setup_cli_logger
setup_cli_logger(logger)
if not type(self).__name__ in ['ModToolInfo', 'ModToolNewModule']: