yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #39714
[Bug 1503415] Re: We should not bypass bytes decode/encode
This bug also affects neutron.agent.linux/windows.utils.execute
** Also affects: neutron
Importance: Undecided
Status: New
** Changed in: neutron
Assignee: (unassigned) => Cedric Brandily (cbrandily)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1503415
Title:
We should not bypass bytes decode/encode
Status in neutron:
New
Status in python-neutronclient:
In Progress
Bug description:
The commit fcf289797c063088f9003359dfd1c7d4f41ed5ef[1] introduces the
pattern:
if six.PY3:
if isinstance(line, bytes):
try:
line = line.decode(encoding='utf-8')
except UnicodeError:
pass
# concat line with a string
which is not working if a UnicodeError is raised: in such case line is
not decoded and line is not converted in a string and the
concatenation with the string fails. We should ensure that line is
converted to a string
[1] https://github.com/openstack/python-neutronclient/commit/fcf289797c063088f9003359dfd1c7d4f41ed5ef
[2] https://github.com/openstack/python-neutronclient/blob/db7eb557403da7c0e1eca7e12f6ddab6bc0d1fc1/neutronclient/tests/unit/test_cli20.py#L77-L81
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1503415/+subscriptions