[Freeipa-devel] [freeipa PR#394][comment] Add fix for ipa plugins command

tiran freeipa-github-notification at redhat.com
Wed Jan 18 09:25:07 UTC 2017


  URL: https://github.com/freeipa/freeipa/pull/394
Title: #394: Add fix for ipa plugins command

tiran commented:
"""
In Python 2 str is a Chimera with the head of a text object and the body of a bytes object. It's just text if all text you got is ASCII. For clean polyglot code it's highly recommended to avoid Python 2 str and use Python 2's unicode for all text. Most of FreeIPA's Python code has been adopted to unicode for text very well. This one of the few places that slipped through.

The benefits are consistent treatment of text as Python 2 unicode, which leads to a proper fix instead of a patch (in this case decoding with six.text_type).
"""

See the full comment at https://github.com/freeipa/freeipa/pull/394#issuecomment-273424928


More information about the Freeipa-devel mailing list