← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1380806] Re: Shouldn't use unicode() when exception used in msgs

 

** Also affects: cinder
   Importance: Undecided
       Status: New

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

Title:
  Shouldn't use unicode() when exception used in msgs

Status in Cinder:
  New
Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  There are cases (identified by mriedem) where an exception is used as
  replacement text and is coerced using unicode():

  http://git.openstack.org/cgit/openstack/nova/tree/nova/compute/manager.py?id=2014.2.rc2#n3264

     reason=_("Driver Error: %s") % unicode(e))

  http://git.openstack.org/cgit/openstack/nova/tree/nova/api/ec2/__init__.py?id=2014.2.rc2#n89

     LOG.exception(_("FaultWrapper: %s"), unicode(ex))

  doing this can interfere with translation by causing things to be
  prematurely translated.

  Need to scan for and correct any occurrences.  Also need to look at
  adding/updating a hacking check.

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


References