aboutsummaryrefslogtreecommitdiffstats
path: root/libbe
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2013-07-22 20:38:45 +0200
committerMatěj Cepl <mcepl@redhat.com>2013-07-22 20:39:09 +0200
commit042e66148d4014c459565b4987850fa5e69b562d (patch)
treecfad7b6a29a7db9ed8d43108dcfe9097a0efb3b0 /libbe
parent9b5b2a1b7ca4541b4b34aa4b4f00c2d96a90d79b (diff)
downloadbugseverywhere-042e66148d4014c459565b4987850fa5e69b562d.tar.gz
Make BE working with non-ASCII username.
Signed-off-by: Matěj Cepl <mcepl@redhat.com>
Diffstat (limited to 'libbe')
-rw-r--r--libbe/ui/command_line.py2
-rw-r--r--libbe/util/subproc.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/libbe/ui/command_line.py b/libbe/ui/command_line.py
index d94da80..614366d 100644
--- a/libbe/ui/command_line.py
+++ b/libbe/ui/command_line.py
@@ -23,6 +23,7 @@ A command line interface to Bugs Everywhere.
import optparse
import os
import sys
+import locale
import libbe
import libbe.bugdir
@@ -340,6 +341,7 @@ def dispatch(ui, command, args):
return ret
def main():
+ locale.setlocale(locale.LC_ALL, '')
io = libbe.command.StdInputOutput()
ui = CommandLine(io)
be = BE(ui=ui)
diff --git a/libbe/util/subproc.py b/libbe/util/subproc.py
index f1f04c1..0ad010c 100644
--- a/libbe/util/subproc.py
+++ b/libbe/util/subproc.py
@@ -87,7 +87,9 @@ def invoke(args, stdin=None, stdout=PIPE, stderr=PIPE, expect=(0,),
stdout = unicode(stdout, encoding)
if stderr != None:
stderr = unicode(stderr, encoding)
- libbe.LOG.debug('{0}\n{1}{2}'.format(status, stdout, stderr))
+ libbe.LOG.debug(u'{0}\n{1}{2}'.format(status, stdout, stderr))
+ else:
+ libbe.LOG.debug('{0}\n{1}{2}'.format(status, stdout, stderr))
if status not in expect:
raise CommandError(list_args, status, stdout, stderr)
return status, stdout, stderr