Change in ovirt-engine-sdk[sdk_4.1]: Fix parsing of multi-byte UTF-8 characters

From Ondra Machacek <omachace@redhat.com>:
Ondra Machacek has submitted this change and it was merged. Change subject: Fix parsing of multi-byte UTF-8 characters ...................................................................... Fix parsing of multi-byte UTF-8 characters Currently the Reader.read method assumes that strings need to be encoded using UTF-8 before parsing them. This is only true in Python 3, where strings are sequences of 16 bits characters. But it isn't true in Python 2, and trying to do so fails if the string is already encoded using UTF-8. To avoid that this patch changes the Reader.read method so that it only does this encoding when running with Python 3. Change-Id: I6ab2764da91bfcd1bd50ebec228b2225eac2c446 Bug-Url: https://bugzilla.redhat.com/1461060 Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com> --- M sdk/lib/ovirtsdk4/reader.py M sdk/tests/test_vm_reader.py M sdk/tests/test_xml_reader.py 3 files changed, 43 insertions(+), 5 deletions(-) Approvals: Ondra Machacek: Verified; Looks good to me, approved Jenkins CI: Passed CI tests -- To view, visit https://gerrit.ovirt.org/78209 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6ab2764da91bfcd1bd50ebec228b2225eac2c446 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine-sdk Gerrit-Branch: sdk_4.1 Gerrit-Owner: Ondra Machacek <omachace@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Ondra Machacek <omachace@redhat.com> Gerrit-Reviewer: gerrit-hooks <automation@ovirt.org>
participants (1)
-
Code Review