diff options
author | Jamie Lennox <jamielennox@redhat.com> | 2015-05-05 10:59:40 +1000 |
---|---|---|
committer | Jamie Lennox <jamielennox@redhat.com> | 2015-05-05 11:02:35 +1000 |
commit | c7ec27a448d20201471a8f953e3b58b9ded589aa (patch) | |
tree | d4e1b8a36c291da87711bbbbbee4ffb33510b6c6 /keystoneclient/session.py | |
parent | 39b7f963f595ba3517c7e5540981bce356ec0e1b (diff) | |
download | python-keystoneclient-c7ec27a448d20201471a8f953e3b58b9ded589aa.tar.gz |
Ensure that failing responses are logged
The boolean value of a failed response is False and so the way we
populate the log output does not work when the request failed.
When logging check that a response is not None rather than simply
checking it's boolean value.
Change-Id: I07fb46f156fdf8267fd3d4dc7c587cd604838d73
Closes-Bug: #1451625
Diffstat (limited to 'keystoneclient/session.py')
-rw-r--r-- | keystoneclient/session.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/keystoneclient/session.py b/keystoneclient/session.py index 96df8d0..9bfa875 100644 --- a/keystoneclient/session.py +++ b/keystoneclient/session.py @@ -201,7 +201,7 @@ class Session(object): if not logger.isEnabledFor(logging.DEBUG): return - if response: + if response is not None: if not status_code: status_code = response.status_code if not headers: |