Change in ovirt-engine-sdk[sdk_4.0]: Catch Unicode encode and decode exceptions
omachace at redhat.com
omachace at redhat.com
Mon Aug 29 19:25:16 UTC 2016
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 at redhat.com>
---
M sdk/lib/ovirtsdk4/__init__.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Ondra Machacek: Verified; Looks good to me, approved
Jenkins CI: Passed CI tests
--
To view, visit https://gerrit.ovirt.org/62956
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: sdk_4.0
Gerrit-Owner: Ondra Machacek <omachace at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Ondra Machacek <omachace at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
More information about the Engine-commits
mailing list