Package list python-castellan / fcb39e5
Fix "is" usage with literals This throws warnings on Python 3.8. Change-Id: I82625d6d202b33daaa2e7f02fbfb8dc5ab59079c Eric Harney 1 year, 11 months ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
143143 return self._barbican_client
144144
145145 def _get_keystone_auth(self, context):
146 if context.__class__.__name__ is 'KeystonePassword':
146 if context.__class__.__name__ == 'KeystonePassword':
147147 return identity.Password(
148148 auth_url=context.auth_url,
149149 username=context.username,
159159 project_domain_id=context.project_domain_id,
160160 project_domain_name=context.project_domain_name,
161161 reauthenticate=context.reauthenticate)
162 elif context.__class__.__name__ is 'KeystoneToken':
162 elif context.__class__.__name__ == 'KeystoneToken':
163163 return identity.Token(
164164 auth_url=context.auth_url,
165165 token=context.token,
173173 reauthenticate=context.reauthenticate)
174174 # this will be kept for oslo.context compatibility until
175175 # projects begin to use utils.credential_factory
176 elif context.__class__.__name__ is 'RequestContext':
176 elif context.__class__.__name__ == 'RequestContext':
177177 if getattr(context, 'get_auth_plugin', None):
178178 return context.get_auth_plugin()
179179 else: