print message to console in correct encoding. Fixes #7652
This commit is contained in:
parent
f1ce924a92
commit
e425bc317e
|
@ -147,7 +147,7 @@ def parseOpts():
|
||||||
sys.exit(2)
|
sys.exit(2)
|
||||||
for o, a in opts:
|
for o, a in opts:
|
||||||
if o in ('-h', '--help'):
|
if o in ('-h', '--help'):
|
||||||
print(_('Usage:') + \
|
out = _('Usage:') + \
|
||||||
'\n gajim [options] filename\n\n' + \
|
'\n gajim [options] filename\n\n' + \
|
||||||
_('Options:') + \
|
_('Options:') + \
|
||||||
'\n -h, --help ' + \
|
'\n -h, --help ' + \
|
||||||
|
@ -161,7 +161,8 @@ def parseOpts():
|
||||||
'\n -c, --config-path ' + \
|
'\n -c, --config-path ' + \
|
||||||
_('Set configuration directory') + \
|
_('Set configuration directory') + \
|
||||||
'\n -l, --loglevel ' + \
|
'\n -l, --loglevel ' + \
|
||||||
_('Configure logging system') + '\n')
|
_('Configure logging system') + '\n'
|
||||||
|
print(out.encode(locale.getpreferredencoding()))
|
||||||
sys.exit()
|
sys.exit()
|
||||||
elif o in ('-q', '--quiet'):
|
elif o in ('-q', '--quiet'):
|
||||||
logging_helpers.set_quiet()
|
logging_helpers.set_quiet()
|
||||||
|
|
Loading…
Reference in New Issue