diff options
author | Brant Knudson <bknudson@us.ibm.com> | 2014-09-22 12:48:20 -0500 |
---|---|---|
committer | Brant Knudson <bknudson@us.ibm.com> | 2014-09-22 12:48:20 -0500 |
commit | dee8bc62d641f633342cfdc37a246916a40b2f33 (patch) | |
tree | 02dbd9b4d84a15cbf2fd03b0649b6f0daa7e456a | |
parent | 0b06683be6d13d21dfffa19be46e1159edb9fce0 (diff) | |
download | python-keystoneclient-dee8bc62d641f633342cfdc37a246916a40b2f33.tar.gz |
Fix auth_token for old oslo.config
When running with a havana-level of oslo.config (<1.3.0),
applications with any config options in their api-paste.ini will
fail to start with an error like
'StrOpt' object has no attribute 'type'
This is because the config options didn't have a type attribute
until 1.3.0.
During the grenade test, the havana level of oslo.config is used,
while the master level of keystoneclient is used, and also in the
havana tests the services are still using the keystoneclient
auth_token middleware.
Change-Id: I745c3e04f18941a2d41e191d43f61b926522bb9d
Closes-Bug: #1372422
-rw-r--r-- | keystoneclient/middleware/auth_token.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/keystoneclient/middleware/auth_token.py b/keystoneclient/middleware/auth_token.py index 48bfc5c..64a4a98 100644 --- a/keystoneclient/middleware/auth_token.py +++ b/keystoneclient/middleware/auth_token.py @@ -428,7 +428,7 @@ def _conf_values_type_convert(conf): if not conf: return {} _opts = {} - opt_types = dict((o.dest, o.type) for o in opts) + opt_types = dict((o.dest, getattr(o, 'type', str)) for o in opts) for k, v in six.iteritems(conf): try: if v is None: |