Browse Source

Merge "Expect paste.deploy and gnocchi/panko options"

Zuul 6 months ago
parent
commit
55b6142791

+ 6
- 5
keystonemiddleware/_common/config.py View File

@@ -49,17 +49,18 @@ def _conf_values_type_convert(group_name, all_options, conf):
49 49
     for k, v in conf.items():
50 50
         dest = k
51 51
         try:
52
-            if v is not None:
52
+            # 'here' and '__file__' come from paste.deploy
53
+            # 'configkey' is added by panko and gnocchi
54
+            if v is not None and k not in ['here', '__file__', 'configkey']:
53 55
                 type_, dest = opt_types[k]
54 56
                 v = type_(v)
55 57
         except KeyError:  # nosec
56
-            # This option is not known to auth_token. v is not converted.
57 58
             _LOG.warning(
58
-                'The option "%s" in conf is not known to auth_token', k)
59
+                'The option "%s" is not known to keystonemiddleware', k)
59 60
         except ValueError as e:
60 61
             raise exceptions.ConfigurationError(
61
-                _('Unable to convert the value of %(key)s option into correct '
62
-                  'type: %(ex)s') % {'key': k, 'ex': e})
62
+                _('Unable to convert the value of option "%(key)s" into '
63
+                  'correct type: %(ex)s') % {'key': k, 'ex': e})
63 64
         opts[dest] = v
64 65
 
65 66
     return opts

+ 1
- 1
keystonemiddleware/tests/unit/auth_token/test_auth_token_middleware.py View File

@@ -514,7 +514,7 @@ class GeneralAuthTokenMiddlewareTest(BaseAuthTokenMiddlewareTest,
514 514
         conf = {
515 515
             'wrong_key': '123'
516 516
         }
517
-        log = 'The option "wrong_key" in conf is not known to auth_token'
517
+        log = 'The option "wrong_key" is not known to keystonemiddleware'
518 518
         auth_token.AuthProtocol(self.fake_app, conf)
519 519
         self.assertThat(self.logger.output, matchers.Contains(log))
520 520
 

Loading…
Cancel
Save