Reviewed: https://review.openstack.org/231709 Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=4e4706e0f5652fde452aca3c69a3a08e62513e2f Submitter: Jenkins Branch: master
commit 4e4706e0f5652fde452aca3c69a3a08e62513e2f Author: Cedric Brandily <email address hidden> Date: Tue Oct 6 22:58:07 2015 +0200
Ensure to decode bytes or fail
The commit 048316e98114145ad19285cdeedd0040b59a66f8 introduces the pattern:
if isinstance(line, bytes): try: line = line.decode(encoding='utf-8') except UnicodeError: pass # concat line with a string
which is not working in PY3K if an UnicodeError is raised because line is (silently) not decoded and concatened to a string.
This change ensures to return a text object or to raise an error.
Closes-Bug: #1503415 Blueprint: neutron-python3 Change-Id: I16b8013f33aa3efad65be8040d3210120e047bbd
Reviewed: https:/ /review. openstack. org/231709 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=4e4706e0f56 52fde452aca3c69 a3a08e62513e2f
Committed: https:/
Submitter: Jenkins
Branch: master
commit 4e4706e0f5652fd e452aca3c69a3a0 8e62513e2f
Author: Cedric Brandily <email address hidden>
Date: Tue Oct 6 22:58:07 2015 +0200
Ensure to decode bytes or fail
The commit 048316e98114145 ad19285cdeedd00 40b59a66f8 introduces the
pattern:
if isinstance(line, bytes): encoding= 'utf-8' )
try:
line = line.decode(
except UnicodeError:
pass
# concat line with a string
which is not working in PY3K if an UnicodeError is raised because line
is (silently) not decoded and concatened to a string.
This change ensures to return a text object or to raise an error.
Closes-Bug: #1503415 fad65be8040d321 0120e047bbd
Blueprint: neutron-python3
Change-Id: I16b8013f33aa3e