fix UnicodeEncodeError when prompt is unicode.

pull/7473/head
WAKAYAMA shirou 11 years ago
parent ed7e17210e
commit 346bb611c7

@ -651,9 +651,10 @@ class PlaybookCallbacks(object):
msg = 'input for %s: ' % varname msg = 'input for %s: ' % varname
def prompt(prompt, private): def prompt(prompt, private):
msg = prompt.encode(sys.stdout.encoding)
if private: if private:
return getpass.getpass(prompt) return getpass.getpass(msg)
return raw_input(prompt) return raw_input(msg)
if confirm: if confirm:

Loading…
Cancel
Save