summaryrefslogtreecommitdiff
path: root/gr-utils/python
diff options
context:
space:
mode:
authorJosh Morman <jmorman@perspectalabs.com>2019-07-24 18:18:19 -0400
committerMarcus Müller <marcus@hostalia.de>2019-08-05 16:12:27 +0200
commitcdda3cace38d84c8b0203d33d5180bc68366434f (patch)
treeff8e7ba242af8e3fd8b8a9bdce6add8a2462f844 /gr-utils/python
parent5601b735ada0c3e784a8eaec2d0f3f532a5a264a (diff)
modtool: restore rm functionality
Add import for cli_input as the cli is called in rm.py I suspect that this should be pulled out into cli/rm.py but we'll stick with the low risk fix for now, to be refactored later Fixes #2652
Diffstat (limited to 'gr-utils/python')
-rw-r--r--gr-utils/python/modtool/core/rm.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/gr-utils/python/modtool/core/rm.py b/gr-utils/python/modtool/core/rm.py
index 80011b15ba..390dbd0ed6 100644
--- a/gr-utils/python/modtool/core/rm.py
+++ b/gr-utils/python/modtool/core/rm.py
@@ -137,6 +137,8 @@ class ModToolRemove(ModTool):
may contain references to the globbed files
cmakeedit_func - If the CMakeLists.txt needs special editing, use this
"""
+ if self.cli:
+ from ..cli import cli_input
# 1. Create a filtered list
files = []
for g in globs:
@@ -155,7 +157,7 @@ class ModToolRemove(ModTool):
yes = self.info['yes']
for f in files_filt:
b = os.path.basename(f)
- if not yes:
+ if not yes and self.cli:
ans = cli_input("Really delete {}? [Y/n/a/q]: ".format(f)).lower().strip()
if ans == 'a':
yes = True