format string missing object type

Bug #1220601 reported by Haiwei Xu on 2013-09-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
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) on 2013-09-04
Changed in keystone:
assignee: nobody → Haiwei Xu (xu-haiwei)

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

Changed in keystone:
status: New → In Progress
Dolph Mathews (dolph) on 2013-09-04
Changed in keystone:
importance: Undecided → Medium
Dolph Mathews (dolph) on 2013-09-04
summary: - I found a code error in keystone/common/ldap/core.py
+ format string missing object type

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) on 2013-09-05
Changed in keystone:
milestone: none → havana-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in keystone:
milestone: havana-3 → 2013.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers