On 11/03/2015 02:39 PM, Petr Viktorin wrote:
> Hello,
> Python 3's strings are Unicode, so data coming to or leaving a Python
> program needs to be decoded/encoded if it's to be handled as a string.
> One of the boundaries where encoding is necessary is external programs,
> specifically, ipautil.run.
> Unfortunately there's no one set of options that would work for all
> run() invocations, so I went through them all and specified the
> stdin/stdout/stderr encoding where necessary. I've also updated the call
> sites to make it clearer if the return values are used or not.
> If an encoding is not set, run() will accept/return bytes. (This is a
> fail-safe setting, since it can't raise errors, and using bytes where
> strings are expected generally fails loudly in py3.)
> Note that the changes are not effective under Python 2.

Could someone look at this patch?

Petr Viktorin

Manage your subscription for the Freeipa-devel mailing list:
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to