Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix i18n of string templates.

Change-Id: I4ed11b43b8b1072094bd2b6f88687900c858bafe
  • Loading branch information...
commit f237a67026b330a17b3c937c746d601ca6e63b24 1 parent e1abe0f
Yuriy Taraday authored January 15, 2013
4  keystone/common/controller.py
@@ -18,9 +18,9 @@ def wrapper(self, context, **kwargs):
18 18
         if not context['is_admin']:
19 19
             action = 'identity:%s' % f.__name__
20 20
 
21  
-            LOG.debug(_('RBAC: Authorizing %s(%s)' % (
  21
+            LOG.debug(_('RBAC: Authorizing %s(%s)') % (
22 22
                 action,
23  
-                ', '.join(['%s=%s' % (k, kwargs[k]) for k in kwargs]))))
  23
+                ', '.join(['%s=%s' % (k, kwargs[k]) for k in kwargs])))
24 24
 
25 25
             try:
26 26
                 token_ref = self.token_api.get_token(
16  keystone/common/ldap/core.py
@@ -333,11 +333,11 @@ def deleteTree(self, id):
333 333
 
334 334
 class LdapWrapper(object):
335 335
     def __init__(self, url):
336  
-        LOG.debug(_("LDAP init: url=%s", url))
  336
+        LOG.debug(_("LDAP init: url=%s"), url)
337 337
         self.conn = ldap.initialize(url)
338 338
 
339 339
     def simple_bind_s(self, user, password):
340  
-        LOG.debug(_("LDAP bind: dn=%s", user))
  340
+        LOG.debug(_("LDAP bind: dn=%s"), user)
341 341
         return self.conn.simple_bind_s(user, password)
342 342
 
343 343
     def add_s(self, dn, attrs):
@@ -348,15 +348,15 @@ def add_s(self, dn, attrs):
348 348
                            if kind != 'userPassword'
349 349
                            else ['****'])
350 350
                           for kind, values in ldap_attrs]
351  
-            LOG.debug(_('LDAP add: dn=%s, attrs=%s', dn, sane_attrs))
  351
+            LOG.debug(_('LDAP add: dn=%s, attrs=%s'), dn, sane_attrs)
352 352
         return self.conn.add_s(dn, ldap_attrs)
353 353
 
354 354
     def search_s(self, dn, scope, query):
355 355
         if LOG.isEnabledFor(logging.DEBUG):
356  
-            LOG.debug(_('LDAP search: dn=%s, scope=%s, query=%s',
  356
+            LOG.debug(_('LDAP search: dn=%s, scope=%s, query=%s'),
357 357
                       dn,
358 358
                       scope,
359  
-                      query))
  359
+                      query)
360 360
         res = self.conn.search_s(dn, scope, query)
361 361
 
362 362
         o = []
@@ -376,14 +376,14 @@ def modify_s(self, dn, modlist):
376 376
             sane_modlist = [(op, kind, (values if kind != 'userPassword'
377 377
                                         else ['****']))
378 378
                             for op, kind, values in ldap_modlist]
379  
-            LOG.debug(_("LDAP modify: dn=%s, modlist=%s", dn, sane_modlist))
  379
+            LOG.debug(_("LDAP modify: dn=%s, modlist=%s"), dn, sane_modlist)
380 380
 
381 381
         return self.conn.modify_s(dn, ldap_modlist)
382 382
 
383 383
     def delete_s(self, dn):
384  
-        LOG.debug(_("LDAP delete: dn=%s", dn))
  384
+        LOG.debug(_("LDAP delete: dn=%s"), dn)
385 385
         return self.conn.delete_s(dn)
386 386
 
387 387
     def delete_ext_s(self, dn, serverctrls):
388  
-        LOG.debug(_("LDAP delete_ext: dn=%s, serverctrls=%s", dn, serverctrls))
  388
+        LOG.debug(_("LDAP delete_ext: dn=%s, serverctrls=%s"), dn, serverctrls)
389 389
         return self.conn.delete_ext_s(dn, serverctrls)
4  keystone/common/utils.py
@@ -90,8 +90,8 @@ def generate(self, credentials):
90 90
                                           credentials['verb'],
91 91
                                           credentials['host'],
92 92
                                           credentials['path'])
93  
-        raise Exception(_('Unknown Signature Version: %s' %
94  
-                        credentials['params']['SignatureVersion']))
  93
+        raise Exception(_('Unknown Signature Version: %s') %
  94
+                        credentials['params']['SignatureVersion'])
95 95
 
96 96
     @staticmethod
97 97
     def _get_utf8_value(value):
2  keystone/identity/backends/ldap/core.py
@@ -748,7 +748,7 @@ def add_user(self, role_id, user_id, tenant_id=None):
748 748
             raise exception.Conflict(type='role grant', details=msg)
749 749
         except ldap.NO_SUCH_OBJECT:
750 750
             if tenant_id is None or self.get(role_id) is None:
751  
-                raise Exception(_("Role %s not found" % (role_id,)))
  751
+                raise Exception(_("Role %s not found") % (role_id,))
752 752
 
753 753
             attrs = [('objectClass', [self.object_class]),
754 754
                      (self.member_attribute, [user_dn])]

Git Notes

review

Verified+2: Jenkins
Code-Review+2: Dolph Mathews <dolph.mathews@gmail.com>
Code-Review+1: Jay Pipes <jaypipes@gmail.com>
Approved+1: guang-yee
Code-Review+2: guang-yee
Verified+1: SmokeStack
Submitted-by: Jenkins
Submitted-at: Wed, 16 Jan 2013 07:28:22 +0000
Reviewed-on: https://review.openstack.org/19725
Project: openstack/keystone
Branch: refs/heads/master

0 notes on commit f237a67

Please sign in to comment.
Something went wrong with that request. Please try again.