summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrant Knudson <bknudson@us.ibm.com>2014-09-22 16:11:50 -0500
committerMorgan Fainberg <morgan.fainberg@gmail.com>2014-09-22 16:23:32 -0700
commitbc2613e06b7dee3a51191de900d98636181ba130 (patch)
treeb5252e664b2f0379775a205f2ac0ca0fd6606721
parent1f8b4fe4432c7725ed3ac630ab07990ff9a48d17 (diff)
downloadkeystonemiddleware-bc2613e06b7dee3a51191de900d98636181ba130.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. Change-Id: I745c3e04f18941a2d41e191d43f61b926522bb9d Closes-Bug: #1372422
-rw-r--r--keystonemiddleware/auth_token.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/keystonemiddleware/auth_token.py b/keystonemiddleware/auth_token.py
index 328172e..4d608a2 100644
--- a/keystonemiddleware/auth_token.py
+++ b/keystonemiddleware/auth_token.py
@@ -440,7 +440,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: