** Also affects: python-neutronclient/liberty
   Importance: Undecided
       Status: New

** Changed in: python-neutronclient/liberty
       Status: New => Fix Committed

** Changed in: python-neutronclient/liberty
    Milestone: None => 3.1.1

** Changed in: python-neutronclient/liberty
   Importance: Undecided => High

** Changed in: python-neutronclient/liberty
   Importance: High => Medium

** Tags removed: liberty-backport-potential

-- 
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:
  Fix Released
Status in python-neutronclient:
  Fix Committed
Status in python-neutronclient liberty series:
  Fix Committed

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to