← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1554517] Re: str() should not be used for exception message

 

In python2 era, str() with a multi-byte string failed with UnicodeError as reported here, but python3 handles unicode strings natively and str() accepts unicode strings and never fails.
All of our supported versions now use python3.
Consiering the current situaion, there is no need to fix it. Let's mark it as Won't Fix.

As commented in #1, there is no case where we actually hit this.


** Changed in: horizon
     Assignee: Pragathi Marampudi (pragathi93) => (unassigned)

** Changed in: horizon
       Status: Confirmed => Won't Fix

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1554517

Title:
  str() should not be used for exception message

Status in OpenStack Dashboard (Horizon):
  Won't Fix

Bug description:
  In openstack_auth/backend.py, str() is used for logging of exception messages, but exception message can contain multi-byte strings and if so str() will fail with UnicodeEncodeError.
  We should use '%s' for logging (with more appropriate description).

  https://github.com/openstack/django_openstack_auth/blob/d779eb6fe3dedcd37e777f1530fa24a1a9343353/openstack_auth/backend.py#L113-L127

  NOTE: django-openstack-auth was merged into horizon repo, but this bug
  itself still exists.

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1554517/+subscriptions