mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fix UnicodeEncodeError when prompt is unicode.
This commit is contained in:
parent
ed7e17210e
commit
346bb611c7
1 changed files with 3 additions and 2 deletions
|
@ -651,9 +651,10 @@ class PlaybookCallbacks(object):
|
|||
msg = 'input for %s: ' % varname
|
||||
|
||||
def prompt(prompt, private):
|
||||
msg = prompt.encode(sys.stdout.encoding)
|
||||
if private:
|
||||
return getpass.getpass(prompt)
|
||||
return raw_input(prompt)
|
||||
return getpass.getpass(msg)
|
||||
return raw_input(msg)
|
||||
|
||||
|
||||
if confirm:
|
||||
|
|
Loading…
Reference in a new issue