Ondra Machacek has submitted this change and it was merged.
Change subject: Catch Unicode encode and decode exceptions
......................................................................
Catch Unicode encode and decode exceptions
When an incorrect ASCII string is passed to the 'encode' method it generates an
'UnicodeDecodeError' exception and we catch it. But in Python 3 it generates
'UnicodeEncodeError', and we don't catch it. As a result we don't handle
this
situation correctly in Python 3. This patch changes the SDK so that it catches
both exceptions, so that it will work with Python 2 and 3.
Change-Id: I9d5da5fcd9a6e8de51acd1aaa00a63797700617f
Signed-off-by: Juan Hernandez <juan.hernandez(a)redhat.com>
---
M sdk/lib/ovirtsdk4/__init__.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Ondra Machacek: Looks good to me, approved
Juan Hernandez: Verified
Jenkins CI: Passed CI tests
--
To view, visit
https://gerrit.ovirt.org/62928
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9d5da5fcd9a6e8de51acd1aaa00a63797700617f
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine-sdk
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Ondra Machacek <omachace(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>