Encode properly output in console.py (fix #1673)
This commit is contained in:
parent
ded5a06ac3
commit
76da33368f
1 changed files with 4 additions and 2 deletions
|
|
@ -146,7 +146,8 @@ class ConsoleApplication(Application):
|
||||||
else:
|
else:
|
||||||
loaded += 1
|
loaded += 1
|
||||||
print('%s%d)%s [%s] %s%-15s%s %s' % (self.BOLD, len(modules), self.NC, loaded,
|
print('%s%d)%s [%s] %s%-15s%s %s' % (self.BOLD, len(modules), self.NC, loaded,
|
||||||
self.BOLD, name, self.NC, info.description))
|
self.BOLD, name, self.NC,
|
||||||
|
info.description.encode(self.encoding)))
|
||||||
print('%sa) --all--%s install all backends' % (self.BOLD, self.NC))
|
print('%sa) --all--%s install all backends' % (self.BOLD, self.NC))
|
||||||
print('%sq)%s --stop--\n' % (self.BOLD, self.NC))
|
print('%sq)%s --stop--\n' % (self.BOLD, self.NC))
|
||||||
r = self.ask('Select a backend to create (q to stop)', regexp='^(\d+|q|a)$')
|
r = self.ask('Select a backend to create (q to stop)', regexp='^(\d+|q|a)$')
|
||||||
|
|
@ -456,7 +457,8 @@ class ConsoleApplication(Application):
|
||||||
print(' %s%s%s: %s' % (self.BOLD, key, self.NC, value))
|
print(' %s%s%s: %s' % (self.BOLD, key, self.NC, value))
|
||||||
else:
|
else:
|
||||||
for n, (key, value) in enumerate(v.choices.iteritems()):
|
for n, (key, value) in enumerate(v.choices.iteritems()):
|
||||||
print(' %s%2d)%s %s' % (self.BOLD, n + 1, self.NC, value))
|
print(' %s%2d)%s %s' % (self.BOLD, n + 1, self.NC,
|
||||||
|
value.encode(self.encoding)))
|
||||||
aliases[str(n + 1)] = key
|
aliases[str(n + 1)] = key
|
||||||
question = u'%s (choose in list)' % question
|
question = u'%s (choose in list)' % question
|
||||||
if v.masked:
|
if v.masked:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue