diff options
| author | ting.wang <ting.wang@easystack.cn> | 2016-02-20 14:28:08 +0800 |
|---|---|---|
| committer | ting.wang <ting.wang@easystack.cn> | 2016-02-21 13:21:31 +0800 |
| commit | e2158b7ef4c307ff5be7bd2ef0ca3044f37759d4 (patch) | |
| tree | f42047689a1b39d5c3bdf078261d7a277fcdbed2 /openstackclient/common/exceptions.py | |
| parent | 867bcb0db8742fd2daa5c91dfd3c164ac4178f18 (diff) | |
| download | python-openstackclient-e2158b7ef4c307ff5be7bd2ef0ca3044f37759d4.tar.gz | |
Clean redundant argument to dict.get
`dict.get()` returns `None` by default, if a key wasn't found.
Removing `None` as second argument to avoid redundancy.
Change-Id: Ia82f7469cd019509bbeccbfe54b15eeedc7bb6ea
Diffstat (limited to 'openstackclient/common/exceptions.py')
| -rw-r--r-- | openstackclient/common/exceptions.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openstackclient/common/exceptions.py b/openstackclient/common/exceptions.py index ab043db0..8ec49931 100644 --- a/openstackclient/common/exceptions.py +++ b/openstackclient/common/exceptions.py @@ -122,8 +122,8 @@ def from_response(response, body): if body: if hasattr(body, 'keys'): error = body[body.keys()[0]] - message = error.get('message', None) - details = error.get('details', None) + message = error.get('message') + details = error.get('details') else: # If we didn't get back a properly formed error message we # probably couldn't communicate with Keystone at all. |
