diff options
author | Jenkins <jenkins@review.openstack.org> | 2015-11-25 17:28:43 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2015-11-25 17:28:43 +0000 |
commit | 5816e8ad68cb9a216fb57f1913a2a8709e1f5752 (patch) | |
tree | cd65d79f4d2b6b2fcf842d2cff9f29fdc3c46443 /heatclient/common | |
parent | 354282a9455718d1dbd6df9514171c3f6794a5f7 (diff) | |
parent | 5a658551bddb909d4ff57e53efab21b6d53cc721 (diff) | |
download | python-heatclient-5816e8ad68cb9a216fb57f1913a2a8709e1f5752.tar.gz |
Merge "Enable pep8 E713 test"
Diffstat (limited to 'heatclient/common')
-rw-r--r-- | heatclient/common/http.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/heatclient/common/http.py b/heatclient/common/http.py index 3a26896..fad6627 100644 --- a/heatclient/common/http.py +++ b/heatclient/common/http.py @@ -158,7 +158,7 @@ class HTTPClient(object): kwargs['headers'].setdefault('X-Auth-Url', self.auth_url) if self.region_name: kwargs['headers'].setdefault('X-Region-Name', self.region_name) - if self.include_pass and not 'X-Auth-Key' in kwargs['headers']: + if self.include_pass and 'X-Auth-Key' not in kwargs['headers']: kwargs['headers'].update(self.credentials_headers()) if osprofiler_web: kwargs['headers'].update(osprofiler_web.get_trace_id_headers()) @@ -206,9 +206,9 @@ class HTTPClient(object): self.log_http_response(resp) - if not 'X-Auth-Key' in kwargs['headers'] and \ - (resp.status_code == 401 or - (resp.status_code == 500 and "(HTTP 401)" in resp.content)): + if not ('X-Auth-Key' in kwargs['headers']) and ( + resp.status_code == 401 or + (resp.status_code == 500 and "(HTTP 401)" in resp.content)): raise exc.HTTPUnauthorized(_("Authentication failed. Please try" " again with option %(option)s or " "export %(var)s\n%(content)s") % |