Message incorrectly parses format string

Bug #1207789 reported by John Warren
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo-incubator
Fix Released
Undecided
John Warren

Bug Description

openstack/common/gettextutils.Message._save_dictionary_parameter incorrectly parses the format string when storing the dictionary values, causing some values not be stored. For example:

'Request: %(method)s http://%(server)s:%(port)s%(url)s with headers %(headers)s'

When modding with a dictionary containing the "url" key, the key and its associated value are not copied, leading to an error when an attempt is made to render the Message object, e.g. in a logging operation.

John Warren (jswarren)
Changed in oslo:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo-incubator (master)

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

Changed in oslo:
assignee: nobody → John Warren (jswarren)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo-incubator (master)

Reviewed: https://review.openstack.org/39949
Committed: http://github.com/openstack/oslo-incubator/commit/ed653bffa899dd6cabab20e4ab0283dc742e7da9
Submitter: Jenkins
Branch: master

commit ed653bffa899dd6cabab20e4ab0283dc742e7da9
Author: John Warren <email address hidden>
Date: Fri Aug 2 16:15:26 2013 +0000

    Fix Message format-string parsing

    The parsing in
    openstack/common/gettextutils.Message._save_dictionary_parameter
    does not account for two or more format directives in direct
    succession, e.g.:

    %(key1)s%(key2)s

    causing key/value pairs to not be copied during a mod operation.

    Fixes bug 1207789

    Change-Id: I56940003de3e6e2fa7dd08604d04f4c57586b0a3

Changed in oslo:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in oslo:
milestone: none → havana-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in oslo:
milestone: havana-3 → 2013.2
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.