Don't add exception in msg when using LOG.exception
LOG.exception can record the exception automatically, so we should add exception in msg. Change-Id: I60694fd8d1b1c0bd62461900c6746a0cc300cf5b Closes-Bug: #1529534
This commit is contained in:
parent
aa82107e7b
commit
b9435c4efe
magnum
@ -120,8 +120,8 @@ class KeystoneClientV3(object):
|
||||
trustee_user=trustee_user,
|
||||
impersonation=impersonation,
|
||||
role_names=role_names)
|
||||
except Exception as e:
|
||||
LOG.exception(str(e))
|
||||
except Exception:
|
||||
LOG.exception(_LE('Failed to create trust'))
|
||||
raise exception.TrustCreateFailed(
|
||||
trustee_user_id=trustee_user)
|
||||
return trust
|
||||
@ -137,6 +137,6 @@ class KeystoneClientV3(object):
|
||||
self.client.trusts.delete(trust_id)
|
||||
except kc_exception.NotFound:
|
||||
pass
|
||||
except Exception as e:
|
||||
LOG.exception(str(e))
|
||||
except Exception:
|
||||
LOG.exception(_LE('Failed to delete trust'))
|
||||
raise exception.TrustDeleteFailed(trust_id=trust_id)
|
||||
|
@ -37,9 +37,7 @@ def wrap_container_exception(f):
|
||||
container_uuid = kwargs.get('container').uuid
|
||||
|
||||
LOG.exception(_LE("Error while connect to docker "
|
||||
"container %(name)s: %(error)s"),
|
||||
{'name': container_uuid,
|
||||
'error': str(e)})
|
||||
"container %s"), container_uuid)
|
||||
raise exception.ContainerException(
|
||||
"Docker internal Error: %s" % str(e))
|
||||
return functools.wraps(f)(wrapped)
|
||||
|
Loading…
x
Reference in New Issue
Block a user