mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 08:13:08 +00:00
fix UnicodeEncode error when using pause module with unicode prompt.
This commit is contained in:
@@ -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: '
|
||||
|
||||
Reference in New Issue
Block a user