← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1229071] Re: Make sure powervm driver's exception with appropriate kwargs

 

** Changed in: nova
       Status: In Progress => Invalid

-- 
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/1229071

Title:
  Make sure  powervm driver's exception  with appropriate kwargs

Status in OpenStack Compute (Nova):
  Invalid

Bug description:
  Exception inherit from NovaException  has property fmt_msg . 
  If the fmt_msg  include  %(some_key)s , and  kwargs is empty due to no key-value pair is paassed when construct the exception ,
  will lead KeyError . See https://github.com/openstack/nova/blob/master/nova/exception.py#L120

  
  This is an example:
  >>> kw ={'a':'a','b':'b'}
  >>> print('this is %(a)s' % kw)
  this is a

  >>> print('this is %(a)s' % {})
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
  KeyError: 'a'

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