From 9c996413fdd166efb38713ceefcb46916ab54189 Mon Sep 17 00:00:00 2001 From: Lance Bragstad Date: Tue, 26 Jul 2016 17:04:35 +0000 Subject: [PATCH] Use quotes consistently in token controller I was perusing through the token controller and saw a few places where we use double-quotes mixed with single-quotes. We typically stick to one or the other. Change-Id: Ia56117fea2aa719b3877a4827048b936103b3b81 --- keystone/token/controllers.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/keystone/token/controllers.py b/keystone/token/controllers.py index 045258b76e..6120f10b90 100644 --- a/keystone/token/controllers.py +++ b/keystone/token/controllers.py @@ -85,7 +85,7 @@ class Auth(controller.V2Controller): raise exception.ValidationError(attribute='auth', target='request body') - if "token" in auth: + if 'token' in auth: # Try to authenticate using a token auth_info = self._authenticate_token(request, auth) else: @@ -165,9 +165,9 @@ class Auth(controller.V2Controller): raise exception.ValidationError( attribute='token', target='auth') - if "id" not in auth['token']: + if 'id' not in auth['token']: raise exception.ValidationError( - attribute="id", target="token") + attribute='id', target='token') old_token = auth['token']['id'] if len(old_token) > CONF.max_token_size: @@ -260,7 +260,7 @@ class Auth(controller.V2Controller): raise exception.ValidationError( attribute='passwordCredentials', target='auth') - if "password" not in auth['passwordCredentials']: + if 'password' not in auth['passwordCredentials']: raise exception.ValidationError( attribute='password', target='passwordCredentials') @@ -269,8 +269,8 @@ class Auth(controller.V2Controller): raise exception.ValidationSizeError( attribute='password', size=CONF.identity.max_password_length) - if (not auth['passwordCredentials'].get("userId") and - not auth['passwordCredentials'].get("username")): + if (not auth['passwordCredentials'].get('userId') and + not auth['passwordCredentials'].get('username')): raise exception.ValidationError( attribute='username or userId', target='passwordCredentials')