Comment 7 for bug 1503415

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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