summaryrefslogtreecommitdiff
path: root/heatclient/common
diff options
context:
space:
mode:
authorricolin <rico.l@inwinstack.com>2015-11-15 23:02:12 +0800
committerricolin <rico.l@inwinstack.com>2015-11-23 23:44:51 +0800
commit5a658551bddb909d4ff57e53efab21b6d53cc721 (patch)
treeee8a6579f818264e615a04fe924e175613e56c90 /heatclient/common
parentcdcd7165531a672dd0fdc1c9efd9f714bb0ec9dc (diff)
downloadpython-heatclient-5a658551bddb909d4ff57e53efab21b6d53cc721.tar.gz
Enable pep8 E713 test
Enable E713 test for membership should be 'not in' Change-Id: I22c8f849713f613e0ef5f6011c075de5f31b7621
Diffstat (limited to 'heatclient/common')
-rw-r--r--heatclient/common/http.py8
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") %