Fix bold of 'getpass' question. Closes GH-426.

This commit is contained in:
Valentin Lorentz 2013-01-20 12:39:36 +01:00
parent 06aca4bda8
commit d809db2cc6

View File

@ -133,14 +133,15 @@ def getpass(prompt=None, secondPrompt=None):
prompt += ' ' prompt += ' '
while True: while True:
if useBold: if useBold:
prompt += ansi.RESET prompt = ansi.BOLD + prompt + ansi.RESET
sys.stdout.write(ansi.BOLD) secondPrompt = ansi.BOLD + secondPrompt + ansi.RESET
password = getPass(prompt) password = getPass(prompt)
secondPassword = getPass(secondPrompt) secondPassword = getPass(secondPrompt)
if password != secondPassword: if password != secondPassword:
output(_('Passwords don\'t match.')) output(_('Passwords don\'t match.'))
else: else:
break break
print
return password return password