ipautil.run, kernel_keyring: Encoding fixes for Python 3

https://fedorahosted.org/freeipa/ticket/5638

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
Petr Viktorin
2016-01-26 13:56:54 +01:00
committed by Jan Cholasta
parent fe7bd36728
commit d3851fd76f
3 changed files with 6 additions and 6 deletions

View File

@@ -464,7 +464,7 @@ def run(args, stdin=None, raiseonerr=True, nolog=(), env=None,
if six.PY2:
output = stdout
else:
output = stdout.encode(encoding)
output = stdout.decode(encoding)
else:
output = None
@@ -472,7 +472,7 @@ def run(args, stdin=None, raiseonerr=True, nolog=(), env=None,
if six.PY2:
error_output = stderr
else:
error_output = stderr.encode(encoding)
error_output = stderr.decode(encoding)
else:
error_output = None