format string missing object type

Bug #1220601 reported by Haiwei Xu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
Haiwei Xu

Bug Description

There is a code error in keystone/common/ldap/core.py.

 82 def parse_tls_cert(opt):
 83 try:
 84 return LDAP_TLS_CERTS[opt]
 85 except KeyError:
 86 raise ValueError(_(
 87 'Invalid LDAP TLS certs option: %(option). '
 88 'Choose one of: %(options)s') % {
 89 'option': opt,
 90 'options': ', '.join(LDAP_TLS_CERTS.keys())})

in line 87, %(option) should be changed to %(option)s to show the corret error message when the exception happens.

Haiwei Xu (xu-haiwei)
Changed in keystone:
assignee: nobody → Haiwei Xu (xu-haiwei)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

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

Changed in keystone:
status: New → In Progress
Dolph Mathews (dolph)
Changed in keystone:
importance: Undecided → Medium
Dolph Mathews (dolph)
summary: - I found a code error in keystone/common/ldap/core.py
+ format string missing object type
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/45024
Committed: http://github.com/openstack/keystone/commit/356d246aa083486cf1b6d70440ba13da376ea249
Submitter: Jenkins
Branch: master

commit 356d246aa083486cf1b6d70440ba13da376ea249
Author: Haiwei Xu <email address hidden>
Date: Wed Sep 4 18:19:30 2013 +0900

    Fix the code miss to show the correct error messages

    In keystone/common/ldap/core.py I found the code like below:

     86 raise ValueError(_(
     87 'Invalid LDAP TLS certs option: %(option). '
     88 'Choose one of: %(options)s') % {

    The code "%(option)" in line 87 should be fixed to "%(option)s" to
    show the correct error messages when the exception happens.
    This patch fixes this error.

    Fixes bug #1220601

    Change-Id: I87328080facd4d9b1349a677c00a93d118993538

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