Do not use Exception.message

This does not work in Python 3.

Partial-Bug: 1287323
Change-Id: Iac637bc5a6db21b498f6bce5c48134447c73c6c1
This commit is contained in:
Cyril Roelandt
2014-03-03 16:18:31 +01:00
parent 2b137cd296
commit e9798d5965

View File

@@ -99,13 +99,13 @@ class KeystoneBackend(object):
keystone_exceptions.Forbidden,
keystone_exceptions.NotFound) as exc:
msg = _('Invalid user name or password.')
LOG.debug(exc.message)
LOG.debug(str(exc))
raise KeystoneAuthException(msg)
except (keystone_exceptions.ClientException,
keystone_exceptions.AuthorizationFailure) as exc:
msg = _("An error occurred authenticating. "
"Please try again later.")
LOG.debug(exc.message)
LOG.debug(str(exc))
raise KeystoneAuthException(msg)
# Check expiry for our unscoped auth ref.