Commit 26ec5da5 authored by Benjamin Bouvier's avatar Benjamin Bouvier Committed by ntome

Fixes #307: Remove remaining uses of is_command;

parent a3fe32c8
Pipeline #2722 failed with stages
......@@ -442,22 +442,16 @@ class ConsoleApplication(Application):
choices['p'] = 'Prompt value when needed (do not store it)'
choices['s'] = 'Store value in config'
if v.is_command(v.default):
d = 'c'
elif v.default == '' and not v.noprompt:
d = 'p'
if v.default == '' and not v.noprompt:
default = 'p'
else:
d = 's'
default = 's'
r = self.ask('*** How do you want to store it?', choices=choices, tiny=True, default=d)
r = self.ask('*** How do you want to store it?', choices=choices, tiny=True, default=default)
if r == 'p':
return ''
if r == 'c':
print('Enter the shell command that will print the required value on the standard output')
if v.is_command(v.default):
print(': %s' % v.default[1:-1])
else:
d = None
while True:
cmd = self.ask('')
try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment