diff options
author | Jenkins <jenkins@review.openstack.org> | 2014-09-25 05:12:49 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2014-09-25 05:12:49 +0000 |
commit | d8d1477d83f294edb758d22e08aee919f4cf6d75 (patch) | |
tree | 1bcfef6859f50c1c429753fcd8c4ed00b92b58ea | |
parent | 08416ac2b7236d7288a34ce89326945a214a4e19 (diff) | |
parent | 4a0f0756d8729598091997857b34c503266e2eb6 (diff) | |
download | keystone-d8d1477d83f294edb758d22e08aee919f4cf6d75.tar.gz |
Merge "Prevent infinite recursion on persistence core on init"
-rw-r--r-- | keystone/token/persistence/core.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/keystone/token/persistence/core.py b/keystone/token/persistence/core.py index 58f1ac0c3..84d430357 100644 --- a/keystone/token/persistence/core.py +++ b/keystone/token/persistence/core.py @@ -228,6 +228,14 @@ class Manager(object): def __getattr__(self, item): """Forward calls to the `token_provider_api` persistence manager.""" + # NOTE(morganfainberg): Prevent infinite recursion, raise an + # AttributeError for 'token_provider_api' ensuring that the dep + # injection doesn't infinitely try and lookup self.token_provider_api + # on _process_dependencies. This doesn't need an exception string as + # it should only ever be hit on instantiation. + if item == 'token_provider_api': + raise AttributeError() + f = getattr(self.token_provider_api._persistence, item) LOG.warning(_LW('`token_api.%s` is deprecated as of Juno in favor of ' 'utilizing methods on `token_provider_api` and may be ' |