better display to prompt user passwords

This commit is contained in:
Romain Bignon 2014-02-19 18:06:04 +01:00
commit 8955815805

View file

@ -395,6 +395,8 @@ class ConsoleApplication(BaseApplication):
question = u'[%s] %s' % (v.id, question) question = u'[%s] %s' % (v.id, question)
if isinstance(v, ValueBackendPassword): if isinstance(v, ValueBackendPassword):
print question.encode(sys.stdout.encoding or locale.getpreferredencoding()) + ':'
question = v.label
choices = OrderedDict() choices = OrderedDict()
choices['c'] = 'Run an external tool during backend load' choices['c'] = 'Run an external tool during backend load'
if not v.noprompt: if not v.noprompt:
@ -408,7 +410,7 @@ class ConsoleApplication(BaseApplication):
else: else:
d = 's' d = 's'
r = self.ask('%s: How do you want to store it?' % question, choices=choices, tiny=True, default=d) r = self.ask('*** How do you want to store it?', choices=choices, tiny=True, default=d)
if r == 'p': if r == 'p':
return '' return ''
if r == 'c': if r == 'c':