diff options
| author | Brant Knudson <bknudson@us.ibm.com> | 2015-06-07 11:39:15 -0500 |
|---|---|---|
| committer | Brant Knudson <bknudson@us.ibm.com> | 2015-06-08 20:29:07 -0500 |
| commit | c0046d7d0120ee18aab2f32ac6bdfca724d972ce (patch) | |
| tree | 2bc1496b5c5f533aef9d39797e1f9cc0e43f473c /keystoneclient/auth | |
| parent | 7f407488cefd9668b31df6b4050209438675a95f (diff) | |
| download | python-keystoneclient-c0046d7d0120ee18aab2f32ac6bdfca724d972ce.tar.gz | |
Stop using function deprecated in Python 3
Python 3 deprecated the logger.warn method in favor of warning.
DeprecationWarning: The 'warn' method is deprecated, use 'warning'
instead
Change-Id: Idbd4de3c7c631fb2c235701c9b300c37a90d9538
Diffstat (limited to 'keystoneclient/auth')
| -rw-r--r-- | keystoneclient/auth/identity/base.py | 14 | ||||
| -rw-r--r-- | keystoneclient/auth/identity/generic/base.py | 6 |
2 files changed, 11 insertions, 9 deletions
diff --git a/keystoneclient/auth/identity/base.py b/keystoneclient/auth/identity/base.py index 8b8d705..f785192 100644 --- a/keystoneclient/auth/identity/base.py +++ b/keystoneclient/auth/identity/base.py @@ -208,9 +208,10 @@ class BaseIdentityPlugin(base.BaseAuthPlugin): else: if not service_type: - LOG.warn(_LW('Plugin cannot return an endpoint without ' - 'knowing the service type that is required. Add ' - 'service_type to endpoint filtering data.')) + LOG.warning(_LW( + 'Plugin cannot return an endpoint without knowing the ' + 'service type that is required. Add service_type to ' + 'endpoint filtering data.')) return None if not interface: @@ -243,9 +244,10 @@ class BaseIdentityPlugin(base.BaseAuthPlugin): # NOTE(jamielennox): Again if we can't contact the server we fall # back to just returning the URL from the catalog. This may not be # the best default but we need it for now. - LOG.warn(_LW('Failed to contact the endpoint at %s for discovery. ' - 'Fallback to using that endpoint as the base url.'), - url) + LOG.warning(_LW( + 'Failed to contact the endpoint at %s for discovery. Fallback ' + 'to using that endpoint as the base url.'), + url) else: url = disc.url_for(version) diff --git a/keystoneclient/auth/identity/generic/base.py b/keystoneclient/auth/identity/generic/base.py index 7e148d2..0b87d06 100644 --- a/keystoneclient/auth/identity/generic/base.py +++ b/keystoneclient/auth/identity/generic/base.py @@ -130,9 +130,9 @@ class BaseGenericPlugin(base.BaseIdentityPlugin): except (exceptions.DiscoveryFailure, exceptions.HTTPError, exceptions.ConnectionError): - LOG.warn(_LW('Discovering versions from the identity service ' - 'failed when creating the password plugin. ' - 'Attempting to determine version from URL.')) + LOG.warning(_LW('Discovering versions from the identity service ' + 'failed when creating the password plugin. ' + 'Attempting to determine version from URL.')) url_parts = urlparse.urlparse(self.auth_url) path = url_parts.path.lower() |
