Merge branch 'shirou-devel' into devel
This commit is contained in:
commit
f54a3b6641
2 changed files with 4 additions and 3 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:
|
||||
|
|
|
@ -101,7 +101,7 @@ class ActionModule(object):
|
|||
# Clear out any unflushed buffered input which would
|
||||
# otherwise be consumed by raw_input() prematurely.
|
||||
tcflush(sys.stdin, TCIFLUSH)
|
||||
self.result['user_input'] = raw_input(self.prompt)
|
||||
self.result['user_input'] = raw_input(self.prompt.encode(sys.stdout.encoding))
|
||||
except KeyboardInterrupt:
|
||||
while True:
|
||||
print '\nAction? (a)bort/(c)ontinue: '
|
||||
|
|
Loading…
Add table
Reference in a new issue