summaryrefslogtreecommitdiffstats
path: root/keystone/token
diff options
context:
space:
mode:
authorDolph Mathews <dolph.mathews@gmail.com>2013-05-23 14:09:09 -0500
committerGerrit Code Review <review@openstack.org>2013-05-23 23:48:04 +0000
commit67175a667308e534c1d55931322bbd36e1e0a7c5 (patch)
tree32cc99c03c99899ce2d43711e558961345d56a90 /keystone/token
parent71c6a4b88279ddf9047595fb4c1ffbce4062621d (diff)
downloadkeystone-67175a667308e534c1d55931322bbd36e1e0a7c5.tar.gz
keystone-67175a667308e534c1d55931322bbd36e1e0a7c5.tar.xz
keystone-67175a667308e534c1d55931322bbd36e1e0a7c5.zip
use the 'not in' operator (flake8 H902)
... when evaluating membership in a collection. Change-Id: I3fd3d5b5d5ea505833be50193b8969f8c4feb135
Diffstat (limited to 'keystone/token')
-rw-r--r--keystone/token/controllers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/keystone/token/controllers.py b/keystone/token/controllers.py
index 1e2eb7d6..e9296216 100644
--- a/keystone/token/controllers.py
+++ b/keystone/token/controllers.py
@@ -227,7 +227,7 @@ class Auth(controller.V2Controller):
trust_id = auth['trust_id']
trust_roles = []
for role in trust_ref['roles']:
- if not 'roles' in metadata_ref:
+ if 'roles' not in metadata_ref:
raise exception.Forbidden()()
if role['id'] in metadata_ref['roles']:
trust_roles.append(role['id'])