fix UnicodeEncode error when using pause module with unicode prompt.
This commit is contained in:
parent
346bb611c7
commit
56880b76bb
1 changed files with 1 additions and 1 deletions
|
@ -101,7 +101,7 @@ class ActionModule(object):
|
||||||
# Clear out any unflushed buffered input which would
|
# Clear out any unflushed buffered input which would
|
||||||
# otherwise be consumed by raw_input() prematurely.
|
# otherwise be consumed by raw_input() prematurely.
|
||||||
tcflush(sys.stdin, TCIFLUSH)
|
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:
|
except KeyboardInterrupt:
|
||||||
while True:
|
while True:
|
||||||
print '\nAction? (a)bort/(c)ontinue: '
|
print '\nAction? (a)bort/(c)ontinue: '
|
||||||
|
|
Loading…
Reference in a new issue