diff options
author | Zhongyue Luo <zhongyue.nah@intel.com> | 2013-01-31 14:23:27 +0800 |
---|---|---|
committer | Zhongyue Luo <zhongyue.nah@intel.com> | 2013-02-04 10:13:18 +0800 |
commit | 4cd7abaa350cc7b465b90a26e87f5c73e32a2d1f (patch) | |
tree | 78b226605f6ca1ecf67e86462f0c2e5d5c0b4d73 /keystone/middleware | |
parent | 4722c84fb90c51fb5810ad7b46c48230ecee1a6c (diff) | |
download | keystone-4cd7abaa350cc7b465b90a26e87f5c73e32a2d1f.tar.gz keystone-4cd7abaa350cc7b465b90a26e87f5c73e32a2d1f.tar.xz keystone-4cd7abaa350cc7b465b90a26e87f5c73e32a2d1f.zip |
Fixes 'not in' operator usage
Change-Id: I50a5bbe4800fc88b631701a6be0a0f9feec597d0
Diffstat (limited to 'keystone/middleware')
-rw-r--r-- | keystone/middleware/core.py | 2 | ||||
-rw-r--r-- | keystone/middleware/s3_token.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/keystone/middleware/core.py b/keystone/middleware/core.py index 24495c98..4582f01e 100644 --- a/keystone/middleware/core.py +++ b/keystone/middleware/core.py @@ -105,7 +105,7 @@ class JsonBodyMiddleware(wsgi.Middleware): # Reject unrecognized content types. Empty string indicates # the client did not explicitly set the header - if not request.content_type in ('application/json', ''): + if request.content_type not in ('application/json', ''): e = exception.ValidationError(attribute='application/json', target='Content-Type header') return wsgi.render_exception(e) diff --git a/keystone/middleware/s3_token.py b/keystone/middleware/s3_token.py index 0f207b3d..477de999 100644 --- a/keystone/middleware/s3_token.py +++ b/keystone/middleware/s3_token.py @@ -128,7 +128,7 @@ class S3Token(object): return self.app(environ, start_response) # Read request signature and access id. - if not 'Authorization' in req.headers: + if 'Authorization' not in req.headers: msg = 'No Authorization header. skipping.' self.logger.debug(msg) return self.app(environ, start_response) |