Unexpected exception message when use %(message)s

Bug #1288066 reported by Kiyohiro Adachi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Eduardo Costa

Bug Description

Bad example:
  raise exception.VolumeDriverException(message="Oorah")
  ==> cinder.exception.VolumeDriverException: Oorah

Good example:
  raise exception.VolumeDriverException(message="Oorah")
  ==> cinder.exception.VolumeDriverException: Volume driver reported an error: Oorah

Kiyohiro Adachi (adachi)
Changed in cinder:
assignee: nobody → Kiyohiro Adachi (adachi)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/78115

Changed in cinder:
status: New → In Progress
Mike Perez (thingee)
tags: added: low-hanging-fruit
Changed in cinder:
status: In Progress → Triaged
assignee: Kiyohiro Adachi (adachi) → nobody
Eduardo Costa (ecosta)
Changed in cinder:
assignee: nobody → Eduardo Costa (eduardo-costa)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/132465

Changed in cinder:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/132465
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=9cd907a8377a4c112ce46755ab68b384ceac75c7
Submitter: Jenkins
Branch: master

commit 9cd907a8377a4c112ce46755ab68b384ceac75c7
Author: Eduardo Costa <email address hidden>
Date: Sun Nov 2 16:06:12 2014 +0100

    Fix exception message formatting

    If the exception class made a reference to the "message" field in
    its format string, it would be overriden with the value of the
    "message" argument itself. It is now possible to use the "message"
    field and preserve the desired message formatting. Test cases
    provided.

    Change-Id: I5705203466535fa242d13e43571012e5bf72712a
    Closes-Bug: #1288066

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: kilo-1 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.