mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
[fix] Print unicode string to prevent encoding issue
This commit is contained in:
parent
1ab91440f1
commit
dbc2776b94
2 changed files with 3 additions and 3 deletions
|
@ -109,6 +109,6 @@ def cli(namespaces, args, print_json=False, use_cache=True):
|
|||
'use_cache': use_cache})
|
||||
moulinette.run(args, print_json)
|
||||
except MoulinetteError as e:
|
||||
print('%s %s' % (colorize(m18n.g('error'), 'red'), e.strerror))
|
||||
print(u'%s %s' % (colorize(m18n.g('error'), 'red'), e.strerror))
|
||||
return e.errno
|
||||
return 0
|
||||
|
|
|
@ -251,8 +251,8 @@ class Interface(BaseInterface):
|
|||
|
||||
"""
|
||||
if style == 'success':
|
||||
print('%s %s' % (colorize(m18n.g('success'), 'green'), message))
|
||||
print(u'%s %s' % (colorize(m18n.g('success'), 'green'), message))
|
||||
elif style == 'warning':
|
||||
print('%s %s' % (colorize(m18n.g('warning'), 'yellow'), message))
|
||||
print(u'%s %s' % (colorize(m18n.g('warning'), 'yellow'), message))
|
||||
else:
|
||||
print(message)
|
||||
|
|
Loading…
Add table
Reference in a new issue