PR#1041: fix utf-8 output in CLI
Merges #1041 https://pagure.io/koji/pull-request/1041 Fixes: #1010 https://pagure.io/koji/issue/1010 koji fails runroot because of `UnicodeDecodeError`
This commit is contained in:
commit
5efc150392
1 changed files with 5 additions and 1 deletions
|
|
@ -377,7 +377,11 @@ def watch_logs(session, tasklist, opts, poll_interval):
|
|||
sys.stdout.write("\n")
|
||||
sys.stdout.write("==> %s <==\n" % currlog)
|
||||
lastlog = currlog
|
||||
sys.stdout.write(contents.decode('utf8'))
|
||||
if six.PY3:
|
||||
sys.stdout.buffer.write(contents)
|
||||
else:
|
||||
sys.stdout.write(contents)
|
||||
|
||||
|
||||
if opts.follow:
|
||||
for child in session.getTaskChildren(task_id):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue